[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[cobalt-users] .htaccess for ErrorDocument
- Subject: [cobalt-users] .htaccess for ErrorDocument
- From: "Kyle D. Scholz" <kyle@xxxxxxxxxxxxx>
- Date: Mon Aug 7 18:01:34 2000
I would like to write a script to handle 404 (file not found) errors on my
RaQ2. Apache web server provides a method for providing directory specific
rules in a file that won't effect settings for the rest of the system. These
settings can be placed in ".htaccess" in whichever directories they need to
apply to. I experimented with the file for some time and am still at a loss,
but these are my findings.
The syntax used to reset the error document is:
ErrorDocument <ErrCode> <Relative Path>
I needed to refresh the error page several times in order to get this
statement to work:
ErrorDocument 404 /users/admin/api/error.html
This is a simple and valid HTML file with no special permissions. When I
type in another invlaid URL, it doesn't work again.
The RaQ2 (and probably the others) store error documents in a directory that
is aliased to "/error/" on all sites on the server. I poked around and found
the relative location of the 404 error file and tried this:
ErrorDocument 404 /error/fileNotFound.html
This works every time -- and reads identical to the entry in the apache
config files.
Does anyone have any ideas as to why I'm unable to use my file here instead?
The .htaccess file is being parsed every time I reload a page. The location
of the error file (which is strictly for testing purposes) is completely
valid and can be retrieved by accessing directly (manually typing it into my
web browser).
I appreciate any comments on the subject. Thank you,
Kyle Scholz