Custom 404 error issues with Apache - the ErrorDocument is 404 as well

Viewed 81928

I am trying to create a custom 404 error for my website. I am testing this out using XAMPP on Windows.

My directory structure is as follows:

error\404page.html
index.php
.htaccess

The content of my .htaccess file is:

ErrorDocument 404 error\404page.html

This produces the following result:

alt text

However this is not working - is it something to do with the way the slashes are or how I should be referencing the error document?

site site documents reside in a in a sub folder of the web root if that makes any difference to how I should reference?

When I change the file to be

ErrorDocument 404 /error/404page.html

I receive the following error message which isn't what is inside the html file I have linked - but it is different to what is listed above:

alt text

4 Answers
Related