httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jean-Christian Imbeault ...@mega-bucks.co.jp>
Subject ErrorDocument: 403 Forbidden error
Date Tue, 02 Jul 2002 10:22:47 GMT
I need some clarification on what the referrer is when an ErrorDocument 
is triggered I think.

I am trying to implement an ErrorDocument directives for 403 errors but 
I am running into problems because I have restricted access to my site.

I have restricted access to my site using the following directives:

 #only allow requests originating from "my server"
 SetEnvIfNoCase Referer "^http://my.server.com/" local_ref=1

<Directory "/www/htdocs">
    AllowOverride None
    Order allow,deny
    Allow from env=local_ref
</Directory>

ErrorDocument 403 /error403.html

However if my server gets a request that generates a 403 it send out the 
following:


  Forbidden

You don't have permission to access /badpage.html on this server.

Additionally, a 403 Forbidden error was encountered while trying to use 
an ErrorDocument to handle the request.


But everything is fine if I put this:

<Files error403.html>
  Order Allow,deny
  Allow from all
</Files>

My question is why do I need to explicitly allow access to the 
ErrorDocument file? When an ErrorDocument directive is triggered doesn't 
act like a local request? Or does it cause the browser to request the 
file ErrorDocument is pointing to and the referrer is empty?

Jc


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message