![]() |
|
|
#1
|
|||
|
|||
|
Stopping Referrer Spam
i am hitting by wan*er referrer spammers (like you all). How can i stop them?
They are using proxy servers, so that banning thier ip addresses is not a solid idea. ANd i dont want to reduce my servers performance with putting hundreds of lines to htaccess ( deny from spammer-casino/dot/com ...etc) i scanned my logs and if i block some keywords then it would be prevent %80 of these spammers. For example; if referrer link contains "casino" , "pharmacy" keywords, then stop it. How can i do that with htaccess? Last edited by kusadasi-guy; Mar 24th 2005 at 5:03 pm. |
|
#2
|
||||
|
||||
|
There isn't a "sure fire" way to do it unfortunately... but if you check some of the similar threads (look at the bottom of this page), there are some other threads about it.
__________________
- Shawn Keyword Tracker now supports Google (once again) as well as Bing (new) and Yahoo Please do not PM, IM or email me for product or tool support (they will go unread/ignored), and don't "friend" me unless we are really friends. |
|
#3
|
||||
|
||||
|
I do not have the answer, wish I did. I have seen two methods used that have some appeal to me. Both involve using .htaccess and doing something with sites based on
I have lost the URL showing first method. If someone has it I would appreciate your posting the link. Thanks, Shannon
__________________
Shannon - . Controllable Christmas Lights for Celiac Disease : Zend Certified Engineer : Preschool Curriculum Ideas : Restorable Iron |
|
#4
|
|||
|
|||
|
I found it!
php Code:
I can prevent %70 of all my spammers with just few words. Should i also put these lines to httpd.conf file to prevent all of the domains in the server? |
|
#5
|
||||
|
||||
|
Quote:
RewriteEngine On RewriteCond %{HTTP_REFERER} ^(http://www.)[a-z]+-[a-z]+- [NC] RewriteRule ^(.*) http://%{REMOTE_ADDR}/ [R=301,L] Can I use both to try to a double barrel shotgun approach? Shannon
__________________
Shannon - . Controllable Christmas Lights for Celiac Disease : Zend Certified Engineer : Preschool Curriculum Ideas : Restorable Iron |
|
#6
|
||||
|
||||
|
Smyrl, What does your code do exactally?
|
|
#7
|
||||
|
||||
|
If you're on a Windows box, you can set up a similar function in the global.asa file. Grab incoming referers, do an INSTR() check, and then a response.end that stops them in their tracks.
__________________
Bloggertizer Free blogger/advertiser matching site. Earn money blogging LinkRotatr Save and then display random links on any site | |
|
#8
|
|||
|
|||
|
Quote:
http://www.abc-def- abc-def- And if it does, redirects the browser to the IP address of the browser itself. J.D. |
|
#9
|
||||
|
||||
|
I hate to say it, but that is sorta being downright mean. In my opinion from the way I have my personal stuff setup, it wouldn't be as mean as possible as I have a webserver on my outside address, but that would mean the bandwidth would be used (the webserver is not in my own box but on the same IP #, why not just point to http://127.0.0.1?
|
|
#10
|
||||
|
||||
|
Quote:
RewriteEngine On SetEnvIfNoCase Referer ".*(casino).*" BadReferrer SetEnvIfNoCase Referer ".*(pharmacy).*" BadReferrer SetEnvIfNoCase Referer ".*(gambling).*" BadReferrer order deny,allow deny from env=BadReferrer and RewriteEngine On RewriteCond %{HTTP_REFERER} ^(http://www.)[a-z]+-[a-z]+- [NC] RewriteRule ^(.*) http://%{REMOTE_ADDR}/ [R=301,L] both in my .htaccess? Shannon
__________________
Shannon - . Controllable Christmas Lights for Celiac Disease : Zend Certified Engineer : Preschool Curriculum Ideas : Restorable Iron |
|
#11
|
|||
|
|||
|
Quote:
I would rewrite the expressions as keyword instead of .*(keyword).* for performance reasons, but otherwise, either method or both should work fine. J.D. Last edited by J.D.; Mar 25th 2005 at 1:24 pm. |
|
#12
|
|||
|
|||
|
Hello JD,
As i understand from your reply, these lines are better than SetEnvIf rules, right? RewriteEngine On RewriteCond %{HTTP_REFERER} (casino) [OR] RewriteCond %{HTTP_REFERER} (pharmacy) [OR] RewriteCond %{HTTP_REFERER} (gambling) [NC] RewriteRule .* - [F] Last edited by kusadasi-guy; Mar 25th 2005 at 1:26 pm. |
|
#13
|
|||
|
|||
|
These rules will return 403 (forbidden) when referrer contains any of the specified words:
RewriteCond %{HTTP_REFERER} poker [OR,NC] RewriteCond %{HTTP_REFERER} casino [NC] RewriteRule ^.? - [F] Edit: I think rewrite rules will work faster, but I didn't actually run a test to verify this. J.D. Last edited by J.D.; Mar 25th 2005 at 1:24 pm. |
|
#14
|
|||
|
|||
|
Also, don't forget, the order in which rewrite rules are specified does matter. Rules denying access should go first (otherwise some of the perpetrators may slip through if they hit a preceeding rule with an [L] flag).
J.D. |
|
#15
|
|||
|
|||
|
Seems work perfectly J.D.
Thank You so much Here is my new htaccess; php Code:
|
|
#16
|
|||
|
|||
|
Quote:
Quote:
J.D. |
|
#17
|
||||
|
||||
|
Thanks for posting the solution kusudasi. I put it in my .htaccess and it works well for me.
|
|
#18
|
|||
|
|||
|
Thanks to JD actually, i learned from him.
Just last thing, how can i do it for my server's websites? Should i add that lines (except "RewriteEngine on") to my httpd.conf file? or add to another file? |
|
#19
|
|||
|
|||
|
Quote:
J.D. |
|
#20
|
||||
|
||||
|
Any chance this is for a wordpress blog? I just implemented a plugin that helps block referrer spam.
|
![]() |
| Bookmarks |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Referrer spam summary | J.D. | Traffic Analysis | 1 | Jan 18th 2007 7:10 pm |
| Spam Report Coop | Dominic | General Chat | 15 | Aug 1st 2005 6:06 pm |
| Spam site in COOP | niz85 | Co-op Advertising Network | 16 | Mar 19th 2005 5:54 am |
| Stopping Referrer Spam | Smyrl | Traffic Analysis | 18 | Mar 16th 2005 6:58 am |
| Fight Email Spam With This Program "ABUSE" | mddv | All Other Tools | 0 | Jul 16th 2004 3:25 am |