<IfModule mod_rewrite.c> Options +FollowSymLinks RewriteEngine On RewriteCond %{HTTPS} !=on RewriteRule ^(.*)$ ********** [R=301,L] RewriteCond %{HTTP_HOST} ^www\.example\.ru$ [NC] RewriteRule ^(.*)$ ********** [R=301,L] RewriteCond %{REQUEST_URI} !/$ RewriteCond %{REQUEST_URI} !\. RewriteRule ^(.*) %{REQUEST_URI}/ [R=301,L] RewriteCond %{REQUEST_URI} ^(.*)//(.*)$ RewriteRule . %1/%2 [R=301,L] RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\.php\ HTTP/ RewriteRule ^index\.php$ ********** [R=301,L] RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\.html\ HTTP/ RewriteRule ^index\.html$ ********** [R=301,L] </IfModule>
<IfModule mod_rewrite.c> Options +FollowSymLinks RewriteEngine On RewriteRule ^([^.]*[^/])$ ********** [R=301,L] RewriteCond %{THE_REQUEST} " /index\.(php|htm)" RewriteRule ^index\.(php|htm) ********** [R=301,L] RewriteCond %{HTTPS} !=on [OR] RewriteCond %{THE_REQUEST} ^[^?]+// [OR] RewriteCond %{HTTP_HOST} ^www\. [NC] RewriteRule ^(.*)$ ********** [R=301,L] </IfModule>