|
You just need it once.
And what's that IfModule crap? You shouldn't need that unless it's in the apache server config. You either have mod_rewrite or you don't and you shouldn't need ot be checking it in your htaccess.
And any time you finish a "section" with your RewriteRule, you should put a "(L)ast flag in there.
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www\.)?mydomain.com/.*$ [NC]
RewriteRule \.(gif|jp?g|bmp|png|js|css)$ - [NC,F,L]
RewriteCond %{HTTP_REFERER} badsite\.com [NC]
RewriteRule .* - [F,L]
|