Цикл htaccess 404 - внутренняя ошибка сервера - PullRequest
0 голосов
/ 01 октября 2019

Я новичок здесь, сделал htaccess с 301 страниц перенаправления с расширением (.html), чтобы не иметь расширение. Дело в том, что при вводе неправильного пути к каталогу страница 404.html не работает, вероятно, из-за цикла: она отображает ошибку

Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator at webmaster@pesto.com.uy to inform them of the time this error occurred, and the actions you performed just before this error.

More information about this error may be available in the server error log.

Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.

Файл htaccess выглядит следующим образом:

DirectoryIndex index.html

RewriteEngine On
RewriteRule ^index\.html$ / [R=301,L]
RewriteRule ^(.*)/index\.html$ /$1/ [R=301,L]

RewriteEngine On
RewriteBase /
RewriteCond %{QUERY_STRING} !rewrited
RewriteCond %{SCRIPT_FILENAME} !-f
RewriteCond %{SCRIPT_FILENAME} !-d
RewriteRule ^(.*)$ $1.html [NC,L]

ErrorDocument 404 /404
ErrorDocument 500 /404

Есть идеи, почему это происходит?

С уважением, ребята

...