How to redirect from mirrors to home page?
-
Hello, I was faced with the task of making a redirect from https: // my site /? P = 31 | /? p = 33 | /? p = 27 | /? p = 25 | /? p = 338 /? p = 77 /? p = 19 /? p = 23 to the main page, the pages are all the same, except for the numbers at the end, there is an option to do this:
Redirect 301 / myisite /? p = 31 / https: // myisite.ru/
But I'm not sure if it will work, can you help? have not encountered this beforehtaccess Anonymous, Jun 7, 2020 -
Add
to the top of the .htaccess file
RewriteCond %{QUERY_STRING} (?:^|&)p=
RewriteRule ^ https://site.ru/? [R=301,L]Anonymous
1 Answers
Your Answer
To place the code, please use CodePen or similar tool. Thanks you!