Jump to content

Checkout over SSL, but no other pages


zq29

Recommended Posts

Hi guys,

 

I am trying to ensure that only the checkout page of a website is forced through an SSL connection with mod_rewrite. Here are some relevant bits from my .htaccess file:

 

RewriteEngine On
RewriteBase /
Options FollowSymLinks

RewriteCond %{SERVER_PORT} ^443$
RewriteRule !^checkout\.html$    http://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]

RewriteCond %{SERVER_PORT} ^80$
RewriteRule ^checkout\.html$    https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]

#snip...
RewriteRule ^checkout\.html$    index.php?page=checkout&%{QUERY_STRING}
RewriteRule ^([a-z_]*)\.html$    index.php?page=$1
#snip...

 

Now, when I browse to http(s)://www.domain.com/checkout.html, my address bar points to http://www.domain.com/index.php?page=checkout and then appears to get stuck in an infinite loop.

 

I've been messing with it for a while now and can't figure it out, does anyone have any ideas?

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.