Forum Moderators: coopster & phranque

Message Too Old, No Replies

Rewrite Rule

         

toolman

1:50 am on Oct 16, 2001 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



RewriteEngine on
RewriteCond %{HTTP_USER_AGENT} ^EmailSiphon [OR]
RewriteCond %{HTTP_USER_AGENT} ^EmailWolf [OR]
RewriteCond %{HTTP_USER_AGENT} ^ExtractorPro [OR]
RewriteCond %{HTTP_USER_AGENT} ^Mozilla.*NEWT [OR]
RewriteCond %{HTTP_USER_AGENT} ^Crescent [OR]
RewriteCond %{HTTP_USER_AGENT} ^CherryPicker [OR]
RewriteCond %{HTTP_USER_AGENT} ^[Ww]eb[Bb]andit [OR]
RewriteCond %{HTTP_USER_AGENT} ^WebEMailExtrac.* [OR]
RewriteCond %{HTTP_USER_AGENT} ^NICErsPRO [OR]
RewriteCond %{HTTP_USER_AGENT} ^Telesoft [OR]
RewriteCond %{HTTP_USER_AGENT} ^Zeus.*Webster [OR]
RewriteCond %{HTTP_USER_AGENT} ^Microsoft.URL [OR]
RewriteCond %{HTTP_USER_AGENT} ^Wget [OR]
RewriteCond %{HTTP_USER_AGENT} ^EmailCollector
RewriteRule ^.*$ /badspammer.html [L]

I got this from here. When I test it with Sam Spade I get:
10/15/01 21:46:22 Browsing [XXXXX.com...]
Fetching [XXXXXX.com...] ...
GET / HTTP/1.1

Host: XXXXXXXXX.com

Connection: close

User-Agent: Wget/1.4.5

Is this right?

Air

3:12 am on Oct 16, 2001 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Yeah, that looks right.

toolman

3:52 am on Oct 16, 2001 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



It's not supposed to go to the badspammer.html page?

littleman

4:55 am on Oct 16, 2001 (gmt 0)



Try this:
RewriteEngine on
RewriteBase /
RewriteCond %{HTTP_USER_AGENT} ^EmailSiphon [OR]
RewriteCond %{HTTP_USER_AGENT} ^EmailWolf [OR]
RewriteCond %{HTTP_USER_AGENT} ^ExtractorPro [OR]
RewriteCond %{HTTP_USER_AGENT} ^Mozilla.*NEWT [OR]
RewriteCond %{HTTP_USER_AGENT} ^Crescent [OR]
RewriteCond %{HTTP_USER_AGENT} ^CherryPicker [OR]
RewriteCond %{HTTP_USER_AGENT} ^[Ww]eb[Bb]andit [OR]
RewriteCond %{HTTP_USER_AGENT} ^WebEMailExtrac.* [OR]
RewriteCond %{HTTP_USER_AGENT} ^NICErsPRO [OR]
RewriteCond %{HTTP_USER_AGENT} ^Telesoft [OR]
RewriteCond %{HTTP_USER_AGENT} ^Zeus.*Webster [OR]
RewriteCond %{HTTP_USER_AGENT} ^Microsoft.URL [OR]
RewriteCond %{HTTP_USER_AGENT} ^Wget [OR]
RewriteCond %{HTTP_USER_AGENT} ^EmailCollector
RewriteRule ^(.*) badspammer.html [L]

Air

5:16 am on Oct 16, 2001 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



>It's not supposed to go to the badspammer.html page?

Yes, if you change this:

RewriteRule ^.*$ /badspammer.html [L]

to this:

RewriteRule ^.*$ badspammer.html [L]

Pretty much what Littleman said :)

toolman

12:50 pm on Oct 16, 2001 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Yes.Yes.Yes. This has to be the simplest way I've seen to fight the bot war.

sarkye

11:20 pm on Oct 19, 2001 (gmt 0)

10+ Year Member



this looks very cool and I haven't seen anything about it from older threads (which is where I gues it came from )

Can someone tell me where these lines go? In the headers?

theperlyking

11:30 pm on Oct 19, 2001 (gmt 0)

10+ Year Member



How about saving a little typing, e.g


RewriteCond %{HTTP_USER_AGENT} ^(Mozilla\/4\.0\ \(compatible\;\ BorderManager¦Mozilla\/3\.01\ \(compatible\;\)¦Ditto¦Email¦Bulk¦Extra¦Tele¦Site¦Extract¦Scann¦HTTPConnect¦DDemo¦EBrowse) [NC]
RewriteRule .* - [F]

This is what I have to forbid naughty UA's.

sarkye:
The rewrite facilities mentioned here are a feature of mod_rewrite, a module which can optionally be used if you use the apache web server (commonly used on unix/linux servers). The rules above go in the .htaccess file in the appropriate directory.

(edited by: theperlyking at 11:34 pm (gmt) on Oct. 19, 2001

ggrot

11:32 pm on Oct 19, 2001 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Forbid them! Don't do that. Send them to a little script that just dumps a really long (infinitely) list of randonly generated mailto urls at it. Crash the sucker.

theperlyking

11:36 pm on Oct 19, 2001 (gmt 0)

10+ Year Member



Yeah, theres been long discussions about that. Personally I would rather just stop them dead instead of spending time on them.

Froggyman wrote a nice bot-choking script though I believe, if you want to go in that direction.

sarkye

11:56 pm on Oct 19, 2001 (gmt 0)

10+ Year Member



Thanks so much!

I already have this up and running and it's awesome.

I just found this site less than 2 hours ago and I learned something great and picked up a new tool too.

Thank you :)

now if someone can just help with my php promblem ;)

sugarkane

12:05 am on Oct 20, 2001 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



> now if someone can just help with my php promblem

Hehe, just post your problem and I'm sure that someone around here will be able to help :)

sarkye

12:22 am on Oct 20, 2001 (gmt 0)

10+ Year Member



thanks sugarkane...did already...fingers crossed!