httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Selmer Ausland <sel.ausl...@shawcable.com>
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\mailto:craftbot@yahoo.com [OR,NC] 
RewriteRule /*$ http://www.mydomain.com [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} !^http://jkcc.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.jkcc.com/.*$ [NC]
RewriteRule
.*\.(gif|GIF|jpg|JPG|mid|MID|wav|WAV|mp3|MP3|avi|AVI|mpeg|MPEG)$ -
[NC,F]

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:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message