Forum Moderators: phranque
This website has been my last 300 hits. I want it stopped. How is it getting around the .htaccess file? What else can I do?
Here is my .htaccess file:
<Files .htaccess>
order allow,deny
deny from all
</Files>
#problem-site.com
<Limit GET>
order deny,allow
deny from 216.xx.xx.0
deny from 216.xx.xx.255
</Limit>
#problem-site.com
<Limit GET>
order deny,allow
deny from 64.xx.xx.0
deny from 64.xx.xx.255
</Limit>
RewriteEngine on
RewriteBase /
RewriteCond %{HTTP_USER_agent} ^online_link_validator [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^EmailCollector
RewriteRule ^.* - [F]
[edited by: jatar_k at 8:25 pm (utc) on Aug. 15, 2005]
[edit reason] removed specifics [/edit]
Because of the single-Order directive requirement, let's move your .htaccess file protection into mod_rewrite just to keep things simple.
# Set up for mod_access code below
SetEnvIf Request_URI "(custom_403_page\.html¦robots\.txt)$" allowit
#
<Files *>
Order Deny,Allow
#
# Deny from problem-site.com
Deny from 216.xx.xx.0/24
Deny from 64.xx.xx.0/24
#
# Allow [i]everybody[/i] access to robots.txt and custom 403 error page
Allow from env=allowit
#
</Files>
#
# Block access to .htaccess and block specific user-agents
RewriteEngine on
RewriteBase /
RewriteCond %{REQUEST_URI} \.htaccess$ [OR]
RewriteCond %{HTTP_USER_agent} ^online_link_validator [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^EmailCollector
RewriteRule .* - [F]
Jim