httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "J. Bakshi" <>
Subject [users@httpd] Rewritecond and Rewriterules in httpd.conf
Date Thu, 24 Sep 2009 09:06:54 GMT
Hello list,

I have spent half of the day but no success. apache gurus can help me
out.  The Rewriterules are working well in my .htaccess file. As I have
multiple virtual hosts I like to place the common rules in httpd.conf 
to get a performance bonus.  Here are the rules I have in .htaccess

RewriteCond %{HTTP_USER_AGENT} ^ChinaClaw [OR]

RewriteCond %{HTTP_USER_AGENT} ^Custo [OR]
RewriteCond %{HTTP_USER_AGENT} ^Wget [OR]

-- other rules------

RewriteRule ^.* - [F,L]

So I have copied these working .htaccess rules in a file called blacklist.conf

Now in httpd.conf I have added the file as

Include /etc/apache2/blacklist.conf

Restarted the apache and no error message. I have also deleted those rules from .htaccess

BUT wget is successful. It was not successful when the configuration was in .htaccess.

I have found during google search that the Rewriterules are different in httpd.conf than .htacces
I have also tried by putting "/" after the "^" but nothing was successful far. Could any one
please give me a clue ?

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