I have a problem with ErrorDocument - if you type for example https://example.com/12414 it will take you to https://example.com/Errors/404 But if you type for example https://example.com/page_name/132 it does not take you to the error page, but shows Internal Server Error - No my error. Is there any way I can fix this?
My .htaccess file:
ErrorDocument 400 https://example.com/Errors/400.html
ErrorDocument 401 https://example.com/Errors/401.html
ErrorDocument 403 https://example.com/Errors/403.html
ErrorDocument 404 https://example.com/Errors/404.html
ErrorDocument 503 https://example.com/Errors/503.html
RewriteEngine on
RewriteCond %{THE_REQUEST} /([^.]+)\.html [NC]
RewriteRule ^ /%1 [NC,L,R]
RewriteCond %{REQUEST_FILENAME}.html -f
RewriteRule ^ %{REQUEST_URI}.html [NC,L]
Options -Indexes