Web Hosting Talk







View Full Version : Custom 404 error pages with apache


kenfused
07-30-2003, 01:12 PM
Hi
I'm trying to get my own custom 404 error pages to work for apache.


I edited the .htaccess file under my /var/www/html

to include:

"ErrorDocument 404 /missing.php

# -FrontPage-

IndexIgnore .htaccess */.??* *~ *# */HEADER* */README* */_vti*
<Limit GET POST>
order deny,allow
deny from all
allow from all
</Limit>
<Limit PUT DELETE>
order deny,allow
deny from all
</Limit>
AuthName www.myserver.com
AuthUserFile /home/virtual/site111/fst/var/www/html/_vti_pvt/service.pwd
AuthGroupFile /home/virtual/site111/fst/var/www/html/_vti_pvt/service.grp
"

Now I get:

Not Found
The requested URL /tester/0070072728.html was not found on this server.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

Apache/1.3.27 Server at www.myserver.com Port 80


It can't seem to find the errordocument, even though it is in my /var/www/html directory

Note: Everything under the #Frontpage was already in the .htaccess file.

Thanks!

kenfused
07-30-2003, 01:32 PM
Hmmm
removing Everything EXCEPT the
Errordocument 404 line seems to work...

Do I need the rest of the stuff??

chrisS
08-01-2003, 02:53 PM
ErrorDocument 404 /page works just fine for me.


In your first post you have,

"ErrorDocument 404 /missing.php

is the " a type o?

chrisS
08-01-2003, 02:54 PM
If your using Frontpage, yes you need everything there, add the

ErrorDocument 404 /missing.php to the END of the file.