zq29 Posted February 25, 2009 Share Posted February 25, 2009 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 https://forums.phpfreaks.com/topic/146867-checkout-over-ssl-but-no-other-pages/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.