Question regading my .htaccess File

Discussion in 'Programming' started by richybear, Mar 9, 2009.

  1. #1
    I Apoligize For posting this twice, I thought the first time it didn't work for some reason. Please Deleted it.

    First let me say I'm not a coder, a novice really.

    I have a qustion regarding the .htaccess file:

    I have several functions I am using it for, Here's what it looks like now minus several entries to shorten it for the post:

    Options +FollowSymLinks
    RewriteEngine on
    
    # BOTS BLOCKED
    RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?http://mysite.com.*$ [NC]
    [COLOR="Red"]RewriteRule .* - [F,L][/COLOR]
    
    # BAD SPIDERS 
    RewriteCond %{HTTP_USER_AGENT} ^BlackWidow [OR] 
    RewriteCond %{HTTP_USER_AGENT} ^Bot\ mailto:craftbot@yahoo.com [OR] 
    RewriteCond %{HTTP_USER_AGENT} ^ChinaClaw [OR] 
    RewriteCond %{HTTP_USER_AGENT} ^Custo [OR] 
    RewriteCond %{HTTP_USER_AGENT} ^DISCo [OR] 
    RewriteCond %{HTTP_USER_AGENT} ^Zeus 
    [COLOR="Red"]RewriteRule ^.* - [F,L][/COLOR]
    
    # CHINA
    <Limit GET HEAD POST>
    order allow,deny
    deny from 58.14.0.0/15
    deny from 58.16.0.0/16
    deny from 58.17.0.0/17
    deny from 58.17.128.0/17
    allow from all
    </LIMIT>
    Code (markup):
    My question is should I have this line after every Rewrite Rule?:

    RewriteRule ^.* - [F,L]
     
    richybear, Mar 9, 2009 IP