My .htaccess file seems to be ok, but if we try to access a page that does not exist, instead of getting the 404 error response, I get the 500 error response.
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]