Thursday 23 March 2006 10:50:49 pm
I'm stuck on Apache rewrite rules for moving a user to SSL when in the webshop and then moving out of SSL when the user leaves the webshop. I have no problem going to secure, as the following rules work in the httpd.conf for the nonsecure virtual host:
RewriteCond %{SERVER_PORT} !^443$ RewriteRule ^.*/plain/shop/(.*) https://%{SERVER_NAME}/plain/shop/$1 [R,L] After searching and searching and searching this forum and working for hours to write rewrite rules for the httpd.conf for the secure virtual host, I'm stuck. Can someone refer me to rules that might work to figure out if a URL is not in the webshop and rewrite to the nonsecure server? All of the rewrite conditions I've tried cause infinite redirects. From reading the mod_rewrite docs, I'm led to believe that it should be as simple as:
RewriteCond %{PATH_INFO} !^.*/plain/shop/(.*) RewriteRule ^.*/$ http://%{SERVER_NAME}/$1 [R,L] But it's not.
|