My 404 page is not working correctly


If a bad link exists like this ( with a letter missing) then the correct 404 page is not shown and the following error lines are displayed.

The requested URL /vidi/view/3589/heartwicks-lay-down-what-i-can/ was not found on this server.
Additionally, a 404 Not Found
error was encountered while trying to use an ErrorDocument to handle the request.

What am I missing here to make this work correctly? The correct file to be displayed should be /styles/cb_27/layout/404.html, I think?!


Answer: The problem was because my site was in a subdirectory in the domain. If this is the case then the error pages in the htaccess file needs to be changed to reflect the sub directory.

#Error Pages
ErrorDocument 404 /subdirhere/404.php
ErrorDocument 403 /subdirhere/403.php