Answer the question
In order to leave comments, you need to log in
How to redirect via .htaccess by mask?
Good afternoon. Help, please, to solve 2 problems.
1. There are pages like domen.ru/ ?p=168 , domen.ru/ ?p=169 , etc. I need to redirect from such page to the main page.
2. It is necessary to close the indexing of all similar pages like domen.ru/ ?p=168 from search engines
Answer the question
In order to leave comments, you need to log in
These are not pages, but get requests, they have nothing to do with pages.
Get request redirects are different from regular URL redirects.
Geth are not urls, from the point of view of the Apaches they are just geth.
RewriteCond %{QUERY_STRING} (^|&)p=[0-9][0-9][0-9]($|&)
RewriteRule ^domen\.ru/$ /domen.ru/? [L,R=301]
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question