I've edited my .htaccess
file to the following :
ErrorDocument 404 /index.php?page=page-not-found
ErrorDocument 400 /index.php?page=bad-request
Now the error 404 redirects correctly, yet if I enter an address like http://example.com/%22%%5E$%%5E&%C2%A3&
the server doesn't redirect the 400 error, but displays the default apache message. What am I doing wrong?
Best Answer
Quotation from Apache documentation:
So, if you want redirect error 400 you should uncomment
ErrorDocument
directive inhttpd.conf
Apache configuration file as follows:and restart Apache server.