rewrite forcing ssl

Using a single web hosting account to host multiple sites

rewrite forcing ssl

Postby iso » Wed Feb 23, 2005 12:23 am

i'm attempting to rewrite the following urls

http://signup.host.com/ to https://signup.host.com/signup/
http://secure.host.com/ to https://signup.host.com/secure/

This is what i have gotten to work, however i'm having through with the other cases.

RewriteEngine on
RewriteCond %{SERVER_PORT} !443$
RewriteRule ^(.*) https://signup.gracescontactclub.com/:443/signup/$1 [R=301,L]

the vhost for signup.host.com points to /htdocs/SSL/

/htdocs/SSL/signup/
/htdocs/SSL/secure/

thanks in advance!
iso
 

Postby Caterham » Wed Feb 23, 2005 5:29 am

I think this should do it, but why do you use .com/:443, usually it should be .com:443/
Code: Select all
RewriteEngine on
RewriteCond %{SERVER_PORT} !443$
RewriteCond %{HTTP_HOST} ^(www\.)?(signup|secure)\.gracescontactclub\.com
RewriteRule ^(.*) https://signup.gracescontactclub.com:443/%2/$1 [R=301,L]


Bob
Last edited by Caterham on Wed Feb 23, 2005 3:16 pm, edited 1 time in total.
Caterham
 
Posts: 690
Joined: Fri Dec 10, 2004 1:30 pm

Postby iso » Wed Feb 23, 2005 9:27 am

Caterham - thank you for taking a look.

I applied the code to my apache.conf and it is redirecting secure and signup to
https://signup.hostname.com///

It is not adding the ..com/signup/ or ..com/admin/
iso
 

Postby Caterham » Wed Feb 23, 2005 3:16 pm

oops.. it must be %2 above (corrected nor)
Caterham
 
Posts: 690
Joined: Fri Dec 10, 2004 1:30 pm

Postby iso » Wed Feb 23, 2005 8:16 pm

Caterham, you are a god amongst men. thank you for your help!
iso
 


Return to Domain Handling

Who is online

Users browsing this forum: No registered users and 95 guests

cron