htaccess bot denying code doesn't work

May 24, 2010 at 13:39:22
Specs: Windows XP
I've just noticed that my htaccess file isn't deny BOTS, it just brings up a error 500 page and not the expected 403 page. the deny from Ip address works OK

Below is an extract of my file:

<FilesMatch .html>
SetHandler application/x-httpd-php5
</FilesMatch>

<FilesMatch .htm>
SetHandler application/x-httpd-php5
</FilesMatch>

RewriteEngine on
Options +Indexes
Options +FollowSymlinks
RewriteBase /

redirect 301 /s222s.html http://www.domain.com/
redirect 301 /pro222s/sitemap.php http://www.domain.com/sitemap.html
redirect 301 /s222p_1.php http://www.domain.com/sitemap.html

<Files 403.shtml>
order allow,deny
allow from all
</Files>

deny from 12.163.148.246
deny from 24.136.17.129
deny from 24.164.207.111
RewriteCond %{HTTP_USER_AGENT} ^Zeus [OR]
RewriteCond %{HTTP_USER_AGENT} ^ZyBorg [OR]
RewriteCond %{HTTP_USER_AGENT} ^java [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^psycheclone
RewriteRule ^.* - [F,L]

Thanks for any help.

Ian

Sanlucar rentals


See More: htaccess bot denying code doesnt work

Report •

#1
August 19, 2010 at 22:29:22
Put RewriteEngine On

Options +FollowSymlinks
RewriteEngine On
RewriteCond %{HTTP_USER_AGENT} ^Zeus [OR]
RewriteCond %{HTTP_USER_AGENT} ^ZyBorg [OR]
RewriteCond %{HTTP_USER_AGENT} ^java [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^psycheclone
RewriteRule .* - [F,L]

Check thisfor more


Report •
Related Solutions


Ask Question