-1
My file. htaccess seems to be ok, but if we try to access a page that doesn’t exist, instead of getting the 404 error reply, I get the 500 error reply.
This is the current code:
RewriteEngine On # Remove o www e força o https # funciona muito bem Options +FollowSymLinks RewriteCond %{HTTP_HOST} ^www\.(.*) RewriteRule (.*) https://%1/$1 [R=301,L] # Deveria carregar as páginas amigáveis de erros, mas não funciona!!!! RewriteBase / RewriteCond %{REQUEST_URI} ^/404/$ RewriteRule ^(.*)$ /e404.php [L] RewriteCond %{REQUEST_URI} ^/500/$ RewriteRule ^(.*)$ /e500.php [L] # Permite carregar as páginas sem a extensão .php, também está OK. RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteRule (.*) $1.php [L]