PriMoThemes — now s2Member® (official notice)

This is now a very OLD forum system. It's in READ-ONLY mode.
All community interaction now occurs at WP Sharks™. See: new forums @ WP Sharks™

Limit HTTPS to Certain Pages

s2Member Plugin. A Membership plugin for WordPress®.

Limit HTTPS to Certain Pages

Postby tdub11 » June 22nd, 2011, 9:28 pm

Hello-
I would like to use my SSL cert for subscriber logins, wp administration, and of course the API integration with googlecheckout. However, I don't want to use HTTPS when subscribers (after logging in) view posts (I'm going to stream video).

Currently, I have HTTPS working with logins and googlecheckout, but I can't get the posts to display in HTTP.

A good example of what I want to do is the s2member site... when you buy the product it's using HTTPS, but after I login I can view other pages in just HTTP.

Does anyone know how to do this?

Thanks!
User avatar
tdub11
Registered User
Registered User
 
Posts: 17
Joined: June 22, 2011

Re: Limit HTTPS to Certain Pages

Postby Cristián Lávaque » June 23rd, 2011, 12:03 am

You can force a page to login via SSL using ?s2-ssl at the end of the URL to the page. So you could either edit all the links to the pages you want that way, or you could your .htaccess file to do it.
Cristián Lávaque http://s2member.net
Is s2Member working for you? Please rate it Image at WordPress.org. Thanks! :)
User avatar
Cristián Lávaque
Developer
Developer
 
Posts: 6836
Joined: December 22, 2010

Re: Limit HTTPS to Certain Pages

Postby tdub11 » June 23rd, 2011, 5:25 pm

Thanks, Cristian!
Once I'm on a page using HTTPS it seems any other page I go to will use HTTPS as well. Is there a similar way to force a page to just use HTTP by appending something to the url?
User avatar
tdub11
Registered User
Registered User
 
Posts: 17
Joined: June 22, 2011

Re: Limit HTTPS to Certain Pages

Postby Cristián Lávaque » June 23rd, 2011, 9:31 pm

I don't know how to force it to not use SSL. I'll ask Jason.
Cristián Lávaque http://s2member.net
Is s2Member working for you? Please rate it Image at WordPress.org. Thanks! :)
User avatar
Cristián Lávaque
Developer
Developer
 
Posts: 6836
Joined: December 22, 2010

Re: Limit HTTPS to Certain Pages

Postby tdub11 » June 23rd, 2011, 11:21 pm

Thanks, again!
So, the idea is: protect sensitive pages with HTTPS (login, admin, payment gateways, etc.) while using HTTP on not-so-sensitive pages/posts for logged-in users. This would cut down on server load when HTTPS isn't really needed on all pages.
User avatar
tdub11
Registered User
Registered User
 
Posts: 17
Joined: June 22, 2011

Re: Limit HTTPS to Certain Pages

Postby Jason Caldwell » June 23rd, 2011, 11:21 pm

Thanks for the excellent question.
~ and thanks for the heads up Cristián.

What you're describing is the way s2Member behaves already. s2Member will only force SSL on those specific pages where ?s2-ssl is in the URL. So long as your theme follows WordPress standards, all other aspects of your site should remain linked up with the standard http:// protocol. s2Member takes extra steps to ensure this is the case, just for the reason you've mentioned. It's not a good idea to serve ALL Posts/Pages over SSL, as this adds additional strain to a server. This is why s2Member takes those extra steps, to ensure that other Posts/Pages remain unaffected by the Force SSL feature that s2Member provides.

That being said, s2Member only forces SSL, it does not force non-SSL. So although s2Member is designed NOT to convert your entire site over to SSL, it does NOT do anything to your site that would prevent someone from typing https:// directly into their browser. If you wanted to get more creative/restrictive, you might check with a developer that is really good with .htaccess files for Apache.
~ Jason Caldwell / Lead Developer
& Zeitgeist Movie Advocate: http://www.zeitgeistmovie.com/

Is the s2Member plugin working for you? Please rate s2Member at WordPress.org.
You'll need a WordPress.org account ( comes in handy ). Then rate s2Member here Image
.
User avatar
Jason Caldwell
Lead Developer
Lead Developer
 
Posts: 4045
Joined: May 3, 2010
Location: Georgia / USA

Re: Limit HTTPS to Certain Pages

Postby tdub11 » June 26th, 2011, 8:06 pm

ok, great - thanks for the replies!
User avatar
tdub11
Registered User
Registered User
 
Posts: 17
Joined: June 22, 2011

Re: Limit HTTPS to Certain Pages

Postby tdub11 » July 14th, 2011, 9:17 pm

jason-
i've had time to revisit this issue. currently when i'm directed to wp-login.php via wp_loginout() i am sent in http and not https. do i have to add any configurations to the wp-config.php file (e.g. define('FORCE_SSL_LOGIN', true);)?
how would you recommend i troubleshoot this?
thanks much!
User avatar
tdub11
Registered User
Registered User
 
Posts: 17
Joined: June 22, 2011

Re: Limit HTTPS to Certain Pages

Postby Jason Caldwell » July 17th, 2011, 12:29 am

tdub11 wrote:jason-
i've had time to revisit this issue. currently when i'm directed to wp-login.php via wp_loginout() i am sent in http and not https. do i have to add any configurations to the wp-config.php file (e.g. define('FORCE_SSL_LOGIN', true);)?
how would you recommend i troubleshoot this?
thanks much!

Yes, you are correct. s2Member only deals with Posts/Pages that need to be forced to SSL. If you want to force your entire administrative area to SSL, please follow the instructions here: http://codex.wordpress.org/Administration_Over_SSL
~ Jason Caldwell / Lead Developer
& Zeitgeist Movie Advocate: http://www.zeitgeistmovie.com/

Is the s2Member plugin working for you? Please rate s2Member at WordPress.org.
You'll need a WordPress.org account ( comes in handy ). Then rate s2Member here Image
.
User avatar
Jason Caldwell
Lead Developer
Lead Developer
 
Posts: 4045
Joined: May 3, 2010
Location: Georgia / USA

Re: Limit HTTPS to Certain Pages

Postby tdub11 » July 18th, 2011, 9:42 pm

thanks.
so to confirm:

1. by default, https is *not* used by s2member when a user logs in
2. by default, https is *not* used by s2member when a new user registers
User avatar
tdub11
Registered User
Registered User
 
Posts: 17
Joined: June 22, 2011

Re: Limit HTTPS to Certain Pages

Postby Jason Caldwell » July 20th, 2011, 1:17 am

Yes, you are correct in both cases.
~ Jason Caldwell / Lead Developer
& Zeitgeist Movie Advocate: http://www.zeitgeistmovie.com/

Is the s2Member plugin working for you? Please rate s2Member at WordPress.org.
You'll need a WordPress.org account ( comes in handy ). Then rate s2Member here Image
.
User avatar
Jason Caldwell
Lead Developer
Lead Developer
 
Posts: 4045
Joined: May 3, 2010
Location: Georgia / USA


Return to s2Member Plugin

Who is online

Users browsing this forum: Google [Bot] and 0 guests

cron