Reputation: 143
Been hacking away at this for a while now. How would I redirect old pages and their folder structures to new pages and their folder structures with everything intact in the URL at the end? Something like:
RedirectMatch 301 /old-page/(.*) /new-folder/new-page/$1
Upvotes: 1
Views: 60
Reputation: 1345
RewriteRule ^old-page/(.*) /new-folder/new-page/$1 [L,R]
L
flag tells Apache that it's the last rule to be executed for any matches. R
flag does the redirect with 302 as default; if you want a different redirect type, use [L,R=301]
for example.
Upvotes: 1