httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Selmer Ausland <>
Subject [users@httpd] Mod rewrite problems
Date Tue, 16 Dec 2003 21:10:01 GMT
Hello Group;
    I am running Apache 2.0.48, with Windows NT 4.0 on a webhosting
I want to prevent hot-linking to my graphics etc. and ban, or redirect,
spam-bots from my server.

I inserted the following code (below)to prevent hotlinking, to my images
etc., and to ban spambots, first, into the main body of my http conf and
when that did not work, I tried it in my root VirtualHost. It works fine

The problem now is, it now cuts of access to the images and also
prevents viewing the webpages.

When I access my webpages, the webpage shows up but not the graphics.
When I add the code to ban the spambots then I cannot view the webpages,
and receive a forbidden message.

The rewrite section also gives me the following error quote: 

"Redirection limit for this url exceeded. Unable to load the requested

This is the code I am using:

(All name-based VirtualHosts)

<VirtualHost *>
DocumentRoot "D:/Apache2/htdocs"
<Directory "D:/Apache2/htdocs">
Options Indexes
AllowOverride AuthConfig Options FileInfo
Order Allow,Deny
Allow from all
RewriteEngine on
RewriteLog logs/modrewrite.log
RewriteLogLevel 1
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^*$ [NC]
RewriteCond %{HTTP_REFERER} !^*$ [NC]
RewriteRule.*\.(gif|GIF|jpg|mid|wav|mp3|avi|mpeg|)$ - [F]

RewriteCond %{HTTP_USER_AGENT} ^ChinaClaw [OR,NC]
RewriteCond %{HTTP_USER_AGENT} ^Bot\ [OR,NC]
RewriteRule .*\. [R]

Could some kind soul please advise me as to how I can enable the above,
and still be able to view my graphics and webpages. I have studied the
Documentation on Apache and Googled until I am ga-ga and still can't
seem to find the right combination. 

Most of the documentation seems pointed towards .htaccess files. I would
prefer to have to it in my main http conf if possible.

Any help would be appreciated.

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