Answer the question
In order to leave comments, you need to log in
How to make a mass redirect to pages with different id?
Hello. The site structure has changed. We now want all pages in /sites/index.php?action=site&cid=ID to be redirected to /game/ID. It takes a long time to manually assign a redirect to each unit, what needs to be written in .htacess so that the redirect works automatically, no matter what ID is inserted into the address?
Answer the question
In order to leave comments, you need to log in
At the very beginning of .htaccess add
RewriteEngine On
RewriteCond %{THE_REQUEST} " /sites/index\.php\?action=site&cid=([^ &]+)"
RewriteRule ^ /game/%1? [R=301,L,NE]
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question