httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Selmer Ausland <>
Subject [users@httpd] New post, Mod rewrite
Date Wed, 10 Dec 2003 23:22:53 GMT
Hello Group;

Running Apache 2.0.48
Windows NT 4.0
512 memory

I would like to use Mod Rewrite to ban bad bots from my root directory.
Below is an example of what I have in mind. 

RewriteEngine On 
RewriteCond %{HTTP_USER_AGENT} ^ChinaClaw [OR,NC] 
RewriteCond %{HTTP_USER_AGENT} ^Bot\ [OR,NC] 
RewriteRule /*$ [L,R] 

I would like to place this in the body of my Apache httpd conf file
rather than in the individual VH and Directories. (I assume this is
permissable from what I have read in the docs.)

The question is; will this conflict with the current use of mod rewrite
that I am using to prevent linking to my .gifs .jpgs .mid, that is also
located in the body of my Apache httpd conf?

This is a copy from my previous post:

RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^*$ [NC]
RewriteCond %{HTTP_REFERER} !^*$ [NC]
.*\.(gif|GIF|jpg|JPG|mid|MID|wav|WAV|mp3|MP3|avi|AVI|mpeg|MPEG)$ -

Finally, is there any particular section in the main body of the Apache
httpd conf that these rewrite rules should be placed?

Any help would be appreciated, as I really want to prevent these #&*#@#
jerk's robots from accessing my root directory.

Thanks. Selmer Ausland

The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message