Forum Moderators: phranque
The first is this:
I have a set of very simple deny from blah blah rules.
If I test any of those rules by going to the front most page of my site, I get the dreaded:
Forbidden
You don't have permission to access / on this server.
Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request.
message >> A loop, I presume, since Im forbidden to look at the 403 page.
The thing is, if I adjust that url to anything else, the 403 page shows up, as it should.
--
Actually, I can see now what the problem is, I just dont know how to fix it.. If i tack on index.php to my front page url, then the normal 403 shows up. If I dont call a file name specifically, it does not.
I have this in my .htaccess:
<Files 403.shtml>
order allow,deny
allow from all
</Files>
Any suggestions on how I might fix this?
The other thing I am seeing is the "Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace." message..
Ive read on here everything related to it, and am still confused. It occurs in similar situations as the above -- its a banned user, that is not calling an actual file name.
Any and all help with this is greatly appreciated.
[Fri Apr 04 16:05:28 2008] [debug] core.c(3042): [client xx.xx.xx.36] redirected from r->uri = /403.php
that happens 9 times and then I see:
[Fri Apr 04 16:05:28 2008] [debug] core.c(3042): [client xx.xx.xx.36] redirected from r->uri = /
when I am emulating one of the banned ppl.
My 403.php is not doing any redirecting.
Now I see this:
[Fri Apr 04 16:14:17 2008] [debug] core.c(3042): [client 0] redirected from r->uri = /403.shtml
[Fri Apr 04 16:14:17 2008] [debug] core.c(3042): [client 0] redirected from r->uri = /403.shtml
[Fri Apr 04 16:14:17 2008] [debug] core.c(3042): [client 0] redirected from r->uri = /403.shtml
[Fri Apr 04 16:14:17 2008] [debug] core.c(3042): [client 0] redirected from r->uri = /403.shtml
[Fri Apr 04 16:14:17 2008] [debug] core.c(3042): [client 0] redirected from r->uri = /403.shtml
[Fri Apr 04 16:14:17 2008] [debug] core.c(3042): [client 0] redirected from r->uri = /403.shtml
[Fri Apr 04 16:14:17 2008] [debug] core.c(3042): [client 0] redirected from r->uri = /403.shtml
[Fri Apr 04 16:14:17 2008] [debug] core.c(3042): [client 0] redirected from r->uri = /403.shtml
[Fri Apr 04 16:14:17 2008] [debug] core.c(3042): [client 0] redirected from r->uri = /403.shtml
[Fri Apr 04 16:14:17 2008] [debug] core.c(3042): [client 0] redirected from r->uri = /
Only edit was removing my own IP
The likely problem is that you've got another "Order" directive later that's conflicting with this one.
Here's another way to do it, using only one Allow/Deny block for all URLs/files:
SetEnvIf Request_URI "^(403\.shtml¦robots.txt)$" allowsome
#
Order Deny,Allow
Deny from bad-bots
Allow from env=allowsome
Similarly, if you use mod_rewrite to generate Forbidden responses, you'll need to add a rule at or near the top of your rewriterules:
RewriteRule ^(403\.shtml¦robots\.txt)$ - [L]
Replace the broken pipe "¦" characters with solid pipes before use; Posting on this forum modifies the pipe characters.
Jim
10 errors similar to the above. a standard 403 that's also telling me there was a 500 errors. I am **almost** ready to ditch apache 2 and go back to 1.3. One shouldnt have to rewrite a previously working .htaccess .. I thought moving from PHP 4 >> 5 would be the real troublemaker. Surprise, surprise.
ErrorDocument 404 /404.php
ErrorDocument 403 /403.shtml
Deny from comcast.net
<Files 403.shtml>
order allow,deny
allow from all
</Files>
I am shown the custom 403.shtml, as I should be. Now to keep adding "stuff" till I see what breaks it.
[webmasterworld.com...]
Changing all occurances of:
RewriteRule ^.*$ - [F]
to:
RewriteRule !^403\.shtml$ - [F]
has seemingly fixed this.
God only knows what this forum would be like without his wealth of knowledge. Thanks Jim, again :)
Be sure to completely flush your browser cache after changing any server-side code, and be sure to note the warning about broken pipe characters in my previous post.
Jim