Page is a not externally linkable
- Code, Content, and Presentation
-- Perl Server Side CGI Scripting
---- A Close to perfect .htaccess ban list


adriaant - 10:03 am on May 14, 2003 (gmt 0)


I'm trying to ban sites by domain name, since there are recently lots of reference spammers.

I have, for example, the rule:

RewriteCond %{HTTP_REFERER} ^http://(www\.)?.*word.*\.com/.*$ [NC]
RewriteRule ^.*$ - [F,L]

which should ban sites such as
www.nasty.com
www.verynastystuff.com
www.i-am-nasty.com

and so on.

However, it is not working, so I am sure I did not setup a proper pattern match rule. Anyone care to advise?


Thread source:: http://www.webmasterworld.com/perl/687.htm
Brought to you by WebmasterWorld: http://www.webmasterworld.com