Welcome to WebmasterWorld Guest from 35.173.48.224

Forum Moderators: Ocean10000 & phranque

Message Too Old, No Replies

htaccess - mod-rewrite stopped working

all the bad robots are getting full access

     
4:21 am on Dec 12, 2002 (gmt 0)

Junior Member

10+ Year Member

joined:Oct 23, 2002
posts:66
votes: 0


I'm so embarrassed to be asking for help on this again. I implemented mod-rewrite rules in my htaccess file, and checked several "user-agents" via the wannabrowser site. Everything seemed to be working fine (getting 403 errors).

Tonight I just checked again at wannabrowser and every user-agent I inserted was allowed full access. I'm completely confused.

Here's my file:

#htaccess file for mysite.com

ErrorDocument 404 /404.html
ErrorDocument 500 /500.html
ErrorDocument 403 /403.html

IndexIgnore *

<Files .htaccess>
order allow,deny
deny from all
</Files>

RewriteEngine On
RewriteCond %{HTTP_USER_AGENT} ^(-?¦[A-Z]{10})$ [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^Bandit [NC,OR]
---more bad robots---
RewriteCond %{HTTP_USER_AGENT} ^Zeus [NC]
RewriteCond %{HTTP_REFERER} ^http://www.iaea.org
RewriteRule!^403.html$ - [F,L]

Can anyone identify what I've done wrong? Between the first time I checked user-agents at wannabrowser (and got the 403 errors which led me to believe all was okay).. and now... the only thing I've changed is I've added a few new user agents. Also, just this evening I uploaded the trap.pl script for bad spiders - but I'm quite sure that has nothing to do with this because I tested with and without the script in my cgi-bin at wannabrowser. At the moment - it seems anyone can do anything they want at my site! [very dismayed!]

I know the mod-rewrite issues have been reviewed over and over and over again and you're probably all tired of this... nonetheless, can someone help identify what I've done wrong?

Many thanks.

4:36 am on Dec 12, 2002 (gmt 0)

Senior Member

WebmasterWorld Senior Member jdmorgan is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Mar 31, 2002
posts:25430
votes: 0


Busynut,

Missing [OR] following zeus?

You need an [OR] on each RewriteCond except the last one for this to work as expected.

Jim

6:40 am on Dec 12, 2002 (gmt 0)

Junior Member

10+ Year Member

joined:Oct 23, 2002
posts:66
votes: 0


OMG.... Jim I owe you big time. [hanging head in shame]

That was it. Duh!

Thank you so much for saving me from my own stoooopidity!

Sticky-mail me for whatever I owe you on this one... I'm pretty darn good at graphics/photos so if there's something I can do to repay your kindness please please don't hesitate to say so! (it would make me feel better to do something for someone!)

Busynut

7:25 am on Dec 12, 2002 (gmt 0)

Senior Member

WebmasterWorld Senior Member jdmorgan is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Mar 31, 2002
posts:25430
votes: 0


Busynut,

My pleasure - No charge... :)

Been there, done that myself - many times. I still get a 500-Server error about once a month from forgetting to escape the spaces! :o Luckily, it's late at night when the sites are mostly dead, and I always have the backup ready to restore in case of trouble.

Glad you got it fixed!
Jim

3:02 pm on Dec 12, 2002 (gmt 0)

Junior Member

10+ Year Member

joined:Oct 23, 2002
posts:66
votes: 0


:)
Yep... I'm a much happier camper today - glad you're so watchful! Gonna have to brush up on my proofreading skills.
 

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members