Try the below
it is checking if https is on and if not it rewrites to the domain u specify.
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
If it is using a specified port use the following
RewriteEngine On
RewriteCond %{SERVER_PORT} !443
RewriteRule (.*) https://www.example.com/require-secure/ [R]
Cheers
George
-----Original Message-----
From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Ricardo
Sent: Friday, 11 July 2008 11:10 AM
To: cfaussie
Subject: [cfaussie] [OT] .htaccess
Can anyone help me with a .htaccess script.
I need to redirect all traffic that is not https://www.domain.com to
there.
So...
http://domain.com
http://www.domain.com
https://domain.com
all need to go to:
https://www.domain.com
I can get everything to redirect except https://domain.com
If anyone has some links that would be great. So far I have turned up
nothing but some basic examples. Some in depth explanation on how to
construct these files would be good.
Thanks,
Ricardo.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"cfaussie" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/cfaussie?hl=en
-~----------~----~----~----~------~----~------~--~---