I am testing a new website and it is the first time I use XAMPP to avoid testing in a "live" environment.
I need to set a custom error handler to catch 404 errors and execute a PHP file.
I created a .htaccess file and I put it in the folder where the 404 errors should be treated differently
- Code: Select all
ErrorDocument 404 /404handler.php
This did not work.
I tried changing the apache/conf/extra/httpd-multilang-errordoc.conf file to refference a php handler and this didn't work either.
It appears as if the multi-language errors are not working, because the 404 error I get is formatted differently than the english version of the 404 error page in the multi language error documents.
It looks like this:
Not Found
The requested URL /www/mywebsite/myfolder/notexistingfile was not found on this server.
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
--------------------------------------------------------------------------------
Apache/2.2.11 (Win32) DAV/2 mod_ssl/2.2.11 OpenSSL/0.9.8i PHP/5.2.9 Server at 127.0.0.1 Port 80
Your help will be greatly appreciated.