Like the title says, how do I redirect every url that starts with http://site.com/shop to a single page?
so I have:
.... etc, and it should be redirected to http://site.com/new_page
Like the title says, how do I redirect every url that starts with http://site.com/shop to a single page?
so I have:
.... etc, and it should be redirected to http://site.com/new_page
You can use mod_alias’ RedirectMatch
:
RedirectMatch ^/shop(/|$) /new_page
Or mod_rewrite:
RewriteEngine on
RewriteRule ^shop(/|$) /new_page [R]
Note the different pattern for RewriteRule
as mod_rewrite removes the contextual path prefix in per-directory rewrites before testing the rules.