AddType application/x-httpd-php .html .htm
if ($request_uri ~ "/index\.htm") {
return 301 /;
}
if ($request_uri ~ "^([^.?]+)\.htm") {
return 301 $1;
}
location / {
try_files $uri $uri/ $uri.htm$is_args$args;
}
location ~ \.htm {
try_files $uri =404;
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/var/run/php/php7.4-fpm.sock;
}
RewriteRule ^\]\xFD\xEB\xE5\xEA\xF2\xF0\xEE\xE8\xE7\xE5\xF0\xE8\xF2\xE5\xEB\xFC\xED\xFB\xF5 https://site.ru/ [R=301,L]