Not Found 404 error page

hello,

do you know how we can change the error page on the server Pesk :

Not Found
The requested document was not found on this server.
Web Server at mydomain.com

I don’t know if it’s the 404 error page, but I like to show something else than this error message.

Best regards.

This is a server administration and configuration problem, not a programmatic one. These issues have their own forum here on sitepoint.

I point this out not to be rude, but when you get into the intricacies of each field people tend to specialize. I’m a master of PHP, but only have passing knowledge of server configuration (and prefer to do it by command line instead of using cpanel or plesk). There are people who specialize in server setup who hang out over in the server forum that can help you better.

thanks Michael, I don’t know why I’m think of .htaccess
do you think the solution is inside this file ?

Yes it is.

ErrorDocument 404 [COLOR="Red"]/{path_to/}[/COLOR]filename-for-404-page-here

Hello Dan

D you know what I like in this site ? I like that all time there is someone who likes to help, thanks for you and for other, I will try your solution, but just to be sure, like the following is ok ?

[COLOR=“Red”]ErrorDocument 404 http://www.mydomain.com/my404DesignPage.php[/COLOR]

That should work, though you don’t need a full URL, just “my404DesignPage.php”

thanks done, I did like you told me, but, the code display the name of the page and not the page in Firefoxe :

example :

ErrorDocument 404 http://www.mydomain.com/my404DesignPage.php

will display just the following text :

my404DesignPage.php

in firefox, the code not working till now with Explorer and Chrome

What displays that text? When you go to a URL that doesn’t exist that’s what you see? What’s in my404DesignPage.php?

This can’t work or not work in specific browsers, it happens at the server…

when I type any bad link in FireFox, I see the name of the file .php, so I changed to HTML, and it’s ok now with firefoxe and Safari, but nothing happen with Internet Explorer and Chrome.

I’m reading this:

http://www.yourhtmlsource.com/sitemanagement/custom404error.html

hello

everything ok, the code working very well now.

final code is :

ErrorDocument 404 /my404DesignPage.html

and sure my404DesignPage.html page should be in HTTPDOCS folder, I’m writing this note for any future visitor searching for this solution.

Again 10000000000 thanks Dan

bb,

Dan is correct about everything EXCEPT that the redirect for all the ErrorDocuments must be an absolute link. You’ve accomplished that with both the http:// version as well as the /{yadda-yadda} version.

Regards,

DK