Answer the question
In order to leave comments, you need to log in
How to remove cyclicity when redirecting from one page of the site to another page of the same site?
Good afternoon!
The site has 2 pages:
1st - site.ru/catalog 2nd - site.ru/catalog/pererabotka-myasa
Both pages are completely the same, only on the first one the vertical menu is collapsed, and on the second in the vertical menu the item, - processing-meat, disclosed.
I want to prohibit the 1st page from indexing and make a redirect from it to the 2nd. Started with a redirect.
Googling, I came up with this code:
Redirect 301 /catalog http://site.ru/catalog/pererabotka-myasa
RewriteEngine On
[u]сюда вставил код указанный выше[/u]
RewriteCond %{HTTP_HOST} ^www\.(.*) [NC]
RewriteRule ^(.*)$ http://%1/$1 [R=301,L]
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\.php\ HTTP/
RewriteRule ^index\.php$ http://site.ru/ [R=301,L]
RedirectMatch 301 ^/index.php/ http://site.ru/
Answer the question
In order to leave comments, you need to log in
RewriteCond %{REQUEST_URI} !/catalog/pererabotka-myasa$
RewriteRule ^catalog$ /catalog/pererabotka-myasa [L,R=301]
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question