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
Not done it that way before, but looks like the syntax is wrong. An example I found said it should be done as: Order Allow,Deny deny from 12.163.148.246 deny from 24.136.17.129 deny from 24.164.207.111 Allow from all 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] Trev
Hi trev Thanks for that, The problem I have is with the rewritecond, the IP ban is fine. Hope you and your family are a-ok with the shootings in Cumbria this morning. Ian