Log in

View Full Version : php custom 404 error page



kiko08
07-17-2006, 08:47 PM
my free webhost dont offer custom 404 error page and they disabled the function of redirecting error page using htaccess is it possible to have a custom 404 error page embedding it to php? thanks!

Twey
07-17-2006, 09:37 PM
No, you need access to a working .htaccess file or the server's httpd.conf file.

spider1405
07-26-2006, 11:56 PM
how do you create a custom error page if you have access to a .htaccess file??

marketraise
08-02-2006, 07:20 AM
hi

it is basically a serverfile which we don't use very often.


Regards
Chronis Tsempelis
Marketraise Corp.

mwinter
08-02-2006, 12:20 PM
how do you create a custom error page if you have access to a .htaccess file??Use the ErrorDocument directive:

  ErrorDocument error-code document

where error-code is the response status code to be handled (404, 410, etc.), and document is either a quoted string or a URL (absolute, or absolute path) to the document to be returned.

The Apache documentation (http://httpd.apache.org/docs/) for the ErrorDocument directive (http://httpd.apache.org/docs/2.0/mod/core.html#errordocument) contains more information and a few examples.

Mike