RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\.(php|html|htm)(.*)\ HTTP/ RewriteRule ^index.(php|html|htm)/?(.*)$ https://%{HTTP_HOST}/ [R=301] RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ (.*)/index\.(php|html|htm)(.*)\ HTTP/ RewriteRule ^(.*)/index.php/?(.*)$ https://%{HTTP_HOST}/$1 [R=301,L]
RewriteCond %{HTTP_HOST} ^www.site.ru$ [NC] RewriteRule ^(.*)$ https://site.ru/$1 [R=301,L]
RewriteEngine on<br> RewriteCond %{HTTPS} off<br> RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R,L]