Welcome Guest, Not a member yet? Register   Sign In
Rewriting away from SSL
#1

[eluser]Unknown[/eluser]
Hi

I have been referring to an oldish thread which appears to make this work: http://ellislab.com/forums/viewthread/86113/P15

I am trying to force the checkout page to be served via https and then all other pages served via http (no SSL). I can get the first half of this problem to work, but when I enable the rewrite to process all the other pages via standard http, it breaks the first rule and the page gets served via the index.php url such as:

Code:
http://www.mysite.com/index.php/?checkout

instead of:

Code:
http://www.mysite.com/checkout

Here is the code I am using:

Code:
RewriteCond %{HTTPS} off
RewriteCond %{REQUEST_URI} (checkout) [NC]
RewriteRule ^(.*)$ https://%{SERVER_NAME}%{REQUEST_URI} [R=301,L]

RewriteCond %{HTTPS} on
RewriteCond %{REQUEST_URI} !(checkout)
RewriteRule ^(.*)$ http://%{SERVER_NAME}%{REQUEST_URI} [R=301,L]

Any help would be really appreciated.

Jonathan





Theme © iAndrew 2016 - Forum software by © MyBB