Redirect sub directory to subdomain.subdirectory

Posted June 2, 2021 51 views

How do I redirect all urls from shop/allpages to

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
1 answer

Hi there,

You could use the following .htaccess rule to redirect all URLs to a new domain:

RewriteRule ^shop/?(.*)$$1 [R=301,NC,L]

With this rule, if someone visits they would get redirected to

Hope that this helps.