P
P
pamparumba2018-07-06 20:34:22
htaccess
pamparumba, 2018-07-06 20:34:22

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

2 answer(s)
D
dodo512, 2018-07-08
@pamparumba

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]

D
Dimonchik, 2018-07-06
@dimonchik2013

write your option and what does not work

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question