Код: Выделить всё
RewriteEngine On
RewriteCond %{THE_REQUEST} \s/([^.]+)\.html [NC]
RewriteRule ^ /%1 [R=301,L]
RewriteCond %{REQUEST_FILENAME}.html -f
RewriteRule ^([0-9a-zA-Z_-]+)$ $1.html [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^.*$ / [R=301,L]
RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
RewriteRule ^(.*)$ https://%1/$1 [L,R=301]
Код: Выделить всё
RewriteCond %{REQUEST_URI} \[A-Z\]
RewriteRule ^(.\*)$ /${tolower:$1} \[R=301,L\]
Подробнее здесь: https://stackoverflow.com/questions/794 ... url-link-t