Forum Moderators: phranque

Message Too Old, No Replies

Possible to block this in htaccess?

         

janbeeu

2:07 am on Apr 6, 2006 (gmt 0)

10+ Year Member



The url of our index page is www.oursite.com/index.htm
Since a few days we see this referer in our stats logs: www.essense.oursite.com/index.htm. This url leads to our index page without the images because of anti-hotlinking in our .htaccess.

The same thing also happens with other pages of our site.

Is there a way to block anything starting with www.essense in .htaccess? Can anyone tell us where these referers come from?

Thanks in advance

jdMorgan

3:08 pm on Apr 6, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



> Is there a way to block anything starting with www.essense in .htaccess?

Yes, use mod_rewrite, check HTTP_REFERER with RewriteCond, and block access to all but your custom 403 error page (if you have one) using RewriteRule.

> Can anyone tell us where these referers come from?

You can get the client address from your raw logs. But this is the "user" who clicked on a link -- if in fact that link exists. You can search for that link to see if it actually exists on a real site somewhere. If not, the "user" may not actually exist, and the IP address from your logs may in fact point to a host that is spoofing the referrer.

For more information on mod_rewrite, see the documents cited in our forum charter [webmasterworld.com] and the tutorials in the Apache forum section of the WebmasterWorld library [webmasterworld.com]. You can also search WebmasterWorld for examples of similar mod_rewrite applications using "RewriteCond %{HTTP_HOST} subdomain".

Jim

janbeeu

5:24 pm on Apr 6, 2006 (gmt 0)

10+ Year Member



Thanks Jd!