Hi
I have spent a couple of hours this morning trying to ensure I use the correct text in the .htaccess file to redirect http://.domain.com to the www. version and also https://www.domain.com to the non https version.
The code I used is:
RewriteEngine On
RewriteCond %{HTTP_HOST} ^performancemotorcare.com$ [nc]
Rewriterule ^(.*)$ http://www.performancemotorcare.com/$1 [r=301,nc]
RewriteEngine On
RewriteCond %{HTTPS} on
Rewriterule ^(.*)$ http://www.performancemotorcare.com/$1 [r=301,nc]
However the problem I am having is https://performancemotorcare.com which then routes to
http://www.performancemotorcare.com/...motorcare.com/ - which does not exist as a page and looks awful on the screen.
Is there something very simple I am missing or is my approach the wrong one.
Any help would be appreciated.
Thanks
Rob
I have spent a couple of hours this morning trying to ensure I use the correct text in the .htaccess file to redirect http://.domain.com to the www. version and also https://www.domain.com to the non https version.
The code I used is:
RewriteEngine On
RewriteCond %{HTTP_HOST} ^performancemotorcare.com$ [nc]
Rewriterule ^(.*)$ http://www.performancemotorcare.com/$1 [r=301,nc]
RewriteEngine On
RewriteCond %{HTTPS} on
Rewriterule ^(.*)$ http://www.performancemotorcare.com/$1 [r=301,nc]
However the problem I am having is https://performancemotorcare.com which then routes to
http://www.performancemotorcare.com/...motorcare.com/ - which does not exist as a page and looks awful on the screen.
Is there something very simple I am missing or is my approach the wrong one.
Any help would be appreciated.
Thanks
Rob
Comment