I am redirecting my old site URL to a new site.
I have created a htaccess that redirects all old links (except root) to new path with added /shop/ directory. It all works fine but the old https is what all traffic is going to and it is throwing a certificate error becuase there is not SSL on the new server account.
Here is the current htaccess.
RewriteEngine on
RewriteCond %{HTTP_HOST} ^oldsite.com [NC,OR]
RewriteCond %{HTTP_HOST} ^www.oldsite.com [NC]
RewriteCond %{REQUEST_URI} ^/$ [NC]
RewriteRule (.*)$ https://www.newsite.com/ [R=301,NC]
RewriteCond %{HTTP_HOST} ^oldsite.com [NC,OR]
RewriteCond %{HTTP_HOST} ^www.oldsite.com [NC]
RewriteRule ^(.*).(php|html)$ https://www.newsite.com/shop/$1.$2 [L,R=301,NC]
Any advice would be greatly appreciated, thank you in advance!
~M
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…