Vkok2016-02-09 13:19:12
Vkok, 2016-02-09 13:19:12

301 redirect, how to properly arrange in order?

Is there any rule about how to arrange the order when changing the structure of the site, or does it matter what the opinions of respected experts are?
those. first the most global ones: www - without www
then /directories/
then /directories/files.html
then files-from-root.html

Answer the question

In order to leave comments, you need to log in

1 answer(s)
Viktor Taran, 2016-02-26

if you use two-level constructs like
RewriteCond %{REQUEST_URI} ^(.*)/{2,}(.*)$
RewriteRule . %1/%2 [R=301,L]
then there is no difference.
But if you do just
RewriteRule catalog$ http://site.ru/goods[R=301 ,L]
RewriteRule catalog/tovar3.html$ http://site.ru/goods/tovar/tovar3[R=301 , L]
then in this case the redirect of the directory should be after the redirects of everyone inside it.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question