PDA

View Full Version : 404


cngo
01-04-1999, 06:37 PM
How do I have a seperate file not found page in a different directory than in my main directory.

Deb
01-04-1999, 07:18 PM
You really can't...

You may be able to write a cgi script to do this but I really don't know of one off hand... 404's are for the entire domain...

Deb

meikel
01-04-1999, 10:30 PM
As I understood, a 404 document is totally configurable.

If you want any directory to show a special 404 page, just create a .htaccess in that directory that points to that file.

I believe that this can be done for every directory.

Of course, if you don't give a .htaccess file, the file from the upper directory is used (and so on). But it should be possible to create a different 404 for every dir.

Greetings from someone loving .htaccess to drive the server nuts
[nbsp][nbsp]Meikel Weber
http://www.meikel.com

meikel
01-04-1999, 10:34 PM
To be more specific.

Your .htaccess must serve this line:

ErrorDocument 404 /404.htm

Each directory may have its own .htaccess and of course I believe you can point it to any page you like.
So a .htaccess in your /somewhere dir should look like

ErrorDocument 404 /somewhere/404.htm

Meikel