Rewritecond and Rewriterules in httpd.conf

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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


[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux