I have a site where I have had to put a bunch of IP`s and sites on the forbidden list.I was just looking at my log and that is a lot of wasted traffic daily so I want to at least show them some ads on the 403 page. I found the following .htaccess rule on another forum:
I understand the first two lines.I already have a 404 rule set up but obviously if I just enter the 403 rule they wil not get my custom 403 page, just the generic 403 error. So some guy on the forum suggested the above rule.But everything below the # sign is beyond my comprehension
My guess is that if there is a 403 or a 404 it allows only the 404/403 files to be accessed.
I particularly dont get the Deny IP`s.
Code:
errordocument 403 /error403.html errordocument 404 /error404.html # SetEnvIf Request_URI "/error40[34]\.html$" allowit SetEnvIf Request_URI "^/robots.\txt$" allowit Order Deny,Allow Deny from 12.101.152.*** Deny from 12.147.139.*** Allow from allowit
My guess is that if there is a 403 or a 404 it allows only the 404/403 files to be accessed.
I particularly dont get the Deny IP`s.


Comment