Web Hosting Talk







View Full Version : Apache mod_rewrite Question


driverdave
07-04-2002, 04:59 AM
I'd like to have a few scripts on my server operate over my SSL without an a href="https://", and I've figured it out. This seems to work for me in httpd.conf

RewriteCond %{SCRIPT_FILENAME} mysecurepage.php
RewriteRule ^/(.*) https://domain.com/$1 [L,R]

Now, my problem is getting off the SSL layer for all other scripts on the server. I'm horrible with regex. I'd would appreciate it greatly if some one could help me out. I really do not want to hard-code absolute URLs to get off SSL.

Thanks!

driverdave
07-04-2002, 06:16 AM
Ugggghhh, never mind. I totally missed the seperate vhost for the SSL site.

All I had to do was what I was trying to do, just under the wrong vhost container, exclude the files I want to go over SSL.

RewriteCond %{SCRIPT_FILENAME} !mysecurepage.php
RewriteRule ^/(.*) http://domain.com/$1 [L,R]