Reputation: 1205
i am trying to show an custom error message when a page is not found and on my .htaccess i added a line like this:
ErrorDocument 404 error/404.html
but this just shows me 404.html on the screen instead rendering the 404.html page and if i write it like this
ErrorDocument 404 /error/404.html
than it gives me an error
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
Is there another way to do this to show the actual error html page ? Thank you, Daniel!
Upvotes: 2
Views: 655
Reputation: 786011
As per your description it appears that your error
folder is inside DOCUMENT_ROOT/site
folder. In that case following full path ErrorDocument
directive should work for you:
ErrorDocument 404 /site/error/404.html
Upvotes: 2