.htaccess not blocking a specified referrer

I'm using .htaccess to block web visits from unwanted referrers.  However, I still get occasional visits, most recently from www.housesittersinternational.com   Can you explain how this is happening, and how to remedy it?

#Block traffic from "bad" referrers
RewriteEngine On
RewriteBase /

RewriteCond %{HTTP_REFERER} make-money-online\.7makemoneyonline\.com [NC,OR]
RewriteCond %{HTTP_REFERER} 245\.semalt\.com [NC,OR]
RewriteCond %{HTTP_REFERER} best-seo-solution\.com [NC,OR]
RewriteCond %{HTTP_REFERER} best-seo-offer\.com [NC,OR]
RewriteCond %{HTTP_REFERER} 100dollars-seo\.com [NC,OR] 
RewriteCond %{HTTP_REFERER} buttons-for-your-website\.com [NC,OR]
RewriteCond %{HTTP_REFERER} Get-Free-Traffic-Now\.com [NC,OR]
RewriteCond %{HTTP_REFERER} semalt\.com [NC,OR]
RewriteCond %{HTTP_REFERER} housesittersinternational\.com [NC,OR]
RewriteCond %{HTTP_REFERER} buttons-for-website\.com [NC,OR]
RewriteCond %{HTTP_REFERER} success-seo\.com [NC,OR]
RewriteCond %{HTTP_REFERER} semaltmedia\.com [NC]
RewriteRule .* - [F]

Open in new window

ddantesAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

arnoldCommented:
Where is the .htaccess versus the pages being accessed?
0
ddantesAuthor Commented:
Thank you for your question.  .htaccess resides in the root folder on the server, at the same level as the pages which were accessed.
0
arnoldCommented:
You can add rewriteloglevel to see what is going on, the patter of the referer might be URL encoded, or something else caused it to not match.

Presumably, you have confirmed that your httpd.conf allows the rules within .htaccess to be handled/processed. allowOverride

Telnet localhost 80
GET http://www.yoursite.com HTTP/1.1
Host: yourhostname
Referer: one of the entries on your list

See what you get in response, based on your rule, you should get a Status: 403 in the HTTP response.
If you run this test when the loglevel and the log file define, you can see the processing and that may explain why the rule does not match when it should have.

Unfortunately, from the information you posted, there is nothing jumping out.  See when running the tests,  whether disabling the rewriteBase commenting it out,  makes a difference .
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
ddantesAuthor Commented:
Thank you.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Apache Web Server

From novice to tech pro — start learning today.