Reputation: 1
I am a newbie and would like to redirect all my old urls to new ones (moved as subfolder) via htaccess. Also, with 301 permanent redirect.
Old url pattern looks like: http://www.mydomain.com/de/myoldpage.html New url pattern should be: http://www.mydomain.com/shop/de/myoldpage.html
I am using the same domain and same page urls but only my shop is moved to a subfolder "shop". How can i write a redirect rule to redirect all the urls in this pattern.
Thanks in advance.
Upvotes: 0
Views: 516
Reputation: 786111
Try this code in your .htaccess file:
Options +FollowSymlinks -MultiViews
RewriteEngine on
RewriteRule ^(de/.*)$ /shop/$1 [L,R=301,NC]
Upvotes: 2