Jump to content

.htaccess Is Not Redirecting To Error Documents


Recommended Posts

Posted

Hi,

When I use following code to my .htaccess it doesn't redirect to the error document:

Code: ErrorDocument 404 404.php

Result: when I enter a url that doesn't exist, a blank page shows "404.php". Ist shows the relative url I written, but doesn't redirect to the error handling page.

But when I use: ErrorDocument 404 http://netrix.ml/404.php

It works. Please tell me the problem. TIA.

Posted

Thanks for your reply. But from cpanel I have to set error pages for each domains. I will be happy if you tell me what is the issue with .htaccess :)

Posted

Code: ErrorDocument 404 404.php

Try this

ErrorDocument 404 /404.php
Putting the / in front in linux means to go all the way back to the webroot before loading the file 404.php.
Guest
This topic is now closed to further replies.
×
×
  • Create New...