Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Custom Error Document

Status
Not open for further replies.

wook2

IS-IT--Management
Joined
Jun 20, 2005
Messages
1
Location
US
Hi,

I'm having some problems getting my custom error document to work. In .htaccess, I've setup a number of RedirectPermanent mappings that are working, but if I type:

ErrorDocument 404 /mscdev3/error/error_404.htm

it doesn't work.

I've tried:

ErrorDocument 404 /mscdev3/error/error_404.htm

id didn't work either.

My error_404.htm resides one directory down from the site root.

The error I get in the Apache error_log is the following:

File does not exist /var/
My site is setup as a virtual site using the following configuration in httpd.conf:

</VirtualHost>

# Virtual host mscdev3
<VirtualHost 172.17.0.3:80>
DocumentRoot /var/
ServerName mscdev3
<Directory "/var/ Options ExecCGI
AllowOverride All
Allow from from all


Order allow,deny
</Directory>

I think I have my root relative path messed-up.

Any help would be greatly appreciated.
 
wook2,

You can set the path to a custom 404 document in a few ways.

ErrorDocument 404 "Some text"
Will display "Some text"
ErrorDocument 404 /relative/path/to/file
Will append the relative path to your DocumentRoot
ErrorDocument 404 Will redirect to an absolute URL


Wishdiak
A+, Network+, Security+, MCSA: Security 2003
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top