Answer the question
In order to leave comments, you need to log in
Why do duplicates appear?
Hi all!
The site is static, worked stably for a long time.
.HTACCESS
DirectoryIndex index.html
AddDefaultCharset utf-8
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTP_HOST} ^www.site.ru$ [NC]
RewriteRule ^(.*)$ http://site.ru/$1 [R=301,L]
RewriteCond %{REQUEST_URI} !\.[a-zA-Z0-9]{2,4}
RewriteCond %{REQUEST_URI} !/$
RewriteRule ^(.*)$ $1.html
</IfModule>
Redirect 301 /partners.html http://site.ru/partners
just closed the pages, without any redirection... Answer the question
In order to leave comments, you need to log in
DirectoryIndex index.html
AddDefaultCharset utf-8
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTP_HOST} ^www\.site\.ru$ [NC]
RewriteRule ^(.*)$ http://site.ru/$1 [R=301,L]
RewriteCond %{THE_REQUEST} "^\S+ ([^ ?]+)\.html"
RewriteRule ^ %1 [R=301,L]
RewriteCond %{REQUEST_URI} !\.[a-zA-Z0-9]{2,4}
RewriteCond %{REQUEST_URI} !/$
RewriteRule ^(.*)$ $1.html [L]
</IfModule>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question