I am trying to write a .htaccess script that fixes canonical links eg: replaces mydomain.com with
http://www.mydomain.com, but also redirects the corrected domain to the /shop folder when complete
Here is my code:
Options +FollowSymLinks
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteCond %{HTTP_HOST} ^([^.]+\.[a-z]{2,6})$ [NC]
RewriteRule ^(.*)$ http://www.%1/$1 [NC]
RewriteCond %{REQUEST_URI} !^/shop [NC]
RewriteRule ^(.*)$ %1/shop [L,R=301]
Can anybody help me revise this...