Forum Moderators: phranque

Message Too Old, No Replies

htaccess SSL redirect

redirecting user to secure site

         

ControlZ

4:13 am on Feb 7, 2006 (gmt 0)

10+ Year Member



Could use some help with an .htaccess file I have written.

The file currently has redirects for parked domains which worked fine, but when I tired to add a redirect so anyone attempting to access www.example.com, is automatically redirected to [example.com...] I run into problems. I think it's something minor, but not sure.

File is below:

RewriteEngine On
RewriteCond %{SERVER_PORT}!443
RewriteRule (.*) [example.com...] [R]
RewriteCond %{HTTP_HOST} ^example\.com [NC,OR]
RewriteCond %{HTTP_HOST} ^(www\.)?parkeddomain\.com [NC,OR]
RewriteCond %{HTTP_HOST} ^(www\.)?parkeddomain\.com [NC,OR]
RewriteCond %{HTTP_HOST} ^(www\.)?parkeddomain\.com [NC,OR]
RewriteCond %{HTTP_HOST} ^(www\.)?parkeddomain\.com [NC,OR]
RewriteCond %{HTTP_HOST} ^(www\.)?parkeddomain\.com [NC,OR]
RewriteCond %{HTTP_HOST} ^(www\.)?parkeddomain\.org [NC,OR]
RewriteCond %{HTTP_HOST} ^(www\.)?parkeddomain\.com [NC]
RewriteRule (.*) http://www.example.com/$1 [R=301,L]

jdMorgan

3:15 am on Feb 8, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



> I run into problems.

Please describe these problems in detail. What happens and how does that differ from your expectations?
Is there anything in the server error log pertaining to the problems?

Jim