[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [cobalt-users] Server wide custom 404



> >After you made the changes, did you remember to restart httpd?
>
> Actually, I didn't have to make any changes.  This is the way the srm.conf
> file was initially (below).
> ____________________________________________
> ErrorDocument 404 /error/fileNotFound.html
> ErrorDocument 401 /error/authorizationRequired.html
> ErrorDocument 500 /error/internalServerError.html
> ___________________________________________
>
> All I did was make an "error" directory containing "fileNotFound.html" in
> one of my virtual sites,
> but it doesn't work.

Ahh, okay.
This is probably pulling the error pages from Cobalt's own error directory.
Mine (RaQ4i) originally looked like this:
ErrorDocument 401 /cobalt_error/authorizationRequired.html
ErrorDocument 403 /cobalt_error/forbidden.html
ErrorDocument 404 /cobalt_error/fileNotFound.html
ErrorDocument 500 /cobalt_error/internalServerError.html

So I'm thinking if you've got a RaQ2 or 3, it was just /error then instead
of the /cobalt_error they've got in the 4 OS.
Here's what I changed mine to:
#Changed so that users can automatically set their own error files without
#using an .htaccess file. Original lines are commented below for debugging
ErrorDocument 401 /401.html
ErrorDocument 403 /403.html
ErrorDocument 404 /404.html
#We leave 500 as-is so that people can better debug scripts
ErrorDocument 500 /cobalt_error/internalServerError.html

And it works great. The users just drop 401.html (etc.) into their Web
directory and viola - custom error page.

Hope that helps. And don't forget to restart httpd when/if you do this.  ;)

Carrie Bartkowiak