View Full Version : http 404 redirect custom page

12-14-2008, 02:30 PM
hi all

if the page doesnt exist in website then i want to redirect the user to a custom page that displays the message about the page you needed is not available.

Like at present i dont have "pen.php"

if the user writes pen.php then he gets error 404 page cannot be found. i want to show my custom page instead.

i tried writing with .htaccess

ErrorDocument 404 /error.php

but it doesnt works.


12-14-2008, 04:09 PM
Are the permissions correct for the .htaccess file? It should be 644 I believe.

12-14-2008, 04:21 PM
If your error.php file is not in the documentroot, remove the leading slash from the rule.

12-14-2008, 08:07 PM
could be his web host doesn't allow .htaccess files :)