cancel
Showing results for 
Search instead for 
Did you mean: 

Custom 403 Errors + IP Deny

David_W
Rising Star
Posts: 2,293
Thanks: 29
Registered: 19-07-2007

Custom 403 Errors + IP Deny

In my .htaccess I have

<Files *>
order allow,deny
deny from ***
allow from all
</files>
ErrorDocument 403 403.php

The thing is, when I try to access the denied files, I get a normal 403 forbidden as I'm denied access to the custom pages. Any way around that?
2 REPLIES
N/A

Custom 403 Errors + IP Deny

I have tested, and found to work:

<Files .htaccess>
deny from all
</Files>
<Files *>
order allow,deny
deny from ***
allow from all
</files>
<Files 403.php>
allow from all
</Files>
ErrorDocument 403 http://urlTo403ErrorDocument


I couldnt not get the absolute path to the document working, it seemed that IE just took over and displayed its own. However it seems to work this way (the user gets redirected to the error document).

hope this helps
Jarv
David_W
Rising Star
Posts: 2,293
Thanks: 29
Registered: 19-07-2007

Custom 403 Errors + IP Deny

Adding the http:// bit seems to have done the trick, however it takes minutes to load up the 403 page. My .htaccess (which is a mess Shockedops: )

<Files .htaccess>

order allow,deny
deny from all
</Files>
<Files configuration.php>
order allow,deny
deny from all
</Files>
<Files *>
order allow,deny
deny from my.ip.addy
allow from all
</Files>
ErrorDocument 404 /index.php?option=com_content&task=view&id=15&Itemid=45
ErrorDocument 403 http://cgi.dgwebb.force9.co.uk/index.php?option=com_content&task=view&id=16&Itemid=46


Wondering if it is trying (and failing) to load dynamic content onto the 403 page, so it gets caught in a loop which it eventually fixes