Forum Moderators: phranque
Here is some of the code I have in my root folder's .htaccess file. Am I doing anything wrong?
RewriteEngine on
RewriteCond %{HTTP_REFERER}!^$
RewriteCond %{HTTP_REFERER}!^http://#*$!.com/~#*$!^http://xxx.com/~xxx/xxx$ [NC]
RewriteCond %{HTTP_REFERER}!^http://xxx.com/.*$ [NC]
RewriteCond %{HTTP_REFERER}!^http://xxx.com$ [NC]
RewriteCond %{HTTP_REFERER}!^http://xxx.com/.*$ [NC]
RewriteCond %{HTTP_REFERER}!^http://xxx.com$ [NC]
RewriteCond %{HTTP_REFERER}!^http://www.xxx.com/xxxx/.*$ [NC]
RewriteCond %{HTTP_REFERER}!^http://www.xxx.com/xxx$ [NC]
RewriteCond %{HTTP_REFERER}!^http://www.xxx.com/.*$ [NC]
RewriteCond %{HTTP_REFERER}!^http://www.xxx.com$ [NC]
RewriteCond %{HTTP_REFERER}!^http://www.xxx/xxx_xxx/.*$ [NC]
RewriteCond %{HTTP_REFERER}!^http://www.xxx.com/xxx_xxx$ [NC]
RewriteCond %{HTTP_REFERER}!^images.xxx.com/.*$ [NC]
RewriteCond %{HTTP_REFERER}!^images.xxx.com$ [NC]
RewriteCond %{HTTP_REFERER}!^http://xxx.org/.*$ [NC]
RewriteCond %{HTTP_REFERER}!^http://xxx.org/$[NC]
RewriteCond %{HTTP_REFERER}!^http://forums.xxx.com/.*$[NC]
RewriteCond %{HTTP_REFERER}!^http://forums.xxx.com/$[NC]
RewriteCond %{HTTP_REFERER}!^http://www.xxx.com/.*$[NC]
RewriteCond %{HTTP_REFERER}!^http://www.xxx.com/$[NC]
RewriteCond %{HTTP_REFERER}!^http://www.xxx.com/.*$[NC]
RewriteCond %{HTTP_REFERER}!^http://www.xxx.com/$
- you can replace !^$ with a single .
- I have no idea what the second rule does or it supposed to do;
- you can always get rid of (delete) .*$ as it doesn't add anything to the regular expression;
- all referers with start with "http" so the lines with ^images are bogus.