Forum Moderators: DixonJones

Message Too Old, No Replies

Problem using .htaccess to ban a referrer

         

kapow

4:00 pm on Jun 28, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Can someone help me block referrals from one particular site? using .htaccess

I started this thread a while back [webmasterworld.com...] and now I want to try banning (for the first time) and it doesn't work. I put the following into my .htaccess

RewriteEngine on
RewriteCond %{HTTP_REFERRER} somesite\.com [NC]
RewriteRule .* - [F]

I went to 'somesite.com' and clicked the offending link and it still goes to my site.

bull

4:18 pm on Jun 28, 2004 (gmt 0)

10+ Year Member



typo! use
RewriteCond %{HTTP_REFERER}
instead of
RewriteCond %{HTTP_REFERRER}

Here the '.' works without being escaped

kapow

5:24 pm on Jun 28, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



YES!

Thank you :)