N
N
Nikolay2016-08-24 12:06:31
Apache HTTP Server
Nikolay, 2016-08-24 12:06:31

How to make a 301 redirect to another address for multiple pages?

Hello!
I ran into a problem: it is necessary to set up redirects for certain pages to a certain site by type:
?p=711 -> pod.domen.ru
?p=45 -> eshe.domen.ru
?p=33 -> drugoy.domen.ru
? c=13 -> more.domen.ru
There are about 16 such pages, they go out of order and without any dependence (of the letters in the address, only English c and p ).
Tried Redirect 301 /?p=711 http://pod.domen.ru- does not react at all (on the Internet they write that this is due to the presence of a question mark
)

RewriteEngine on
RewriteCond %{QUERY_STRING} ^p=711$
RewriteRule ^(.*)$ http://pod.domen.ru/index.ru [R=301,L]
But it works for one page and for some reason redirects to pod.domen.ru/?p=711
Strange, but the solution from the RewriteRule_Generator service does not work at all :(
Please tell me how to solve the current problem =)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Viktor Taran, 2016-08-24
@iNickolay

Here is a list of URLs that you need
. Select which part of them you really need as an identifier.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question