Specifying a 404 error file


#1

I would like to know how to specify a custom 404 error file. I have previously had one working, by adding it to the .htaccess file like this:

ErrorDocument 404 http://www.domain.com/404.html

But I find that it sometimes just doesn’t work. At those times, when I enter a non-existent URL into the browser address bar file (I’ve actually created a bookmark/shortcut link for testing this), browser just remains on the current page. If I recreate the 404 file, or the .htaccess file, I can sometimes get it to work, but it soon stops again.

I am adding the pointer to the custom 404 using a Notepad like text editor. The DreamHost .htaccess interface doesn’t provide for adding a custom 404 to the file.

I’ve been doing things as per the info on this page:
http://www.4webhelp.net/tutorials/misc/errors.php

Any info on how to this will be very much appreciated.

Thanks!


#2

There is a DreamHost wiki article on this subject, which you might find helpful:

http://wiki.dreamhost.com/Creating_custom_error_pages

–rlparker
–DreamHost Tech Support


#3

Thanks rlp.

Calling it missing took care of it!

:slight_smile:


#4

You should change

ErrorDocument 404 http://www.domain.com/404.html

to

ErrorDocument 404 /404.html


:stuck_out_tongue: Maximum savings promo code: MaxSavingsAtDH