main htacess ?

Nerigal

Verified User
Joined
Jul 6, 2009
Messages
124
hi,

weird question

i wondered if there is a kind of "main htaccess" that would filter every single apache request on a shared host server

this is to prevent duplicating htaccess rules in every domains etc...

thx
 
htaccess is just an override to the virtual host configs. Put anything you want in your virtual host template files.
 
cool thx

and then do you know how to log specific httpd request on a custom file when RewriteCond match ?

thanks
 
I doubt that your

how to log specific httpd request on a custom file when RewriteCond match ?

is any clear for us. So that's why I guess, nobody gave any answer. So please be more specific, and say in other words, what you want to achieve.
 
yeah thanks anyway but found it by myself doing this in the httpd.conf

this is just an example...

RewriteEngine On
RewriteCond %{QUERY_STRING} (query=2)
RewriteRule (.*) - [E=my_request:yes,F]

CustomLog "/var/log/httpd/httpd_filter.log" \
"%v %h %l %u %t \"%r\" %>s %b %I %O %P" env=my_request


so with this i can manually filter all URL Apache has to handle then send it in a log file if it match RewriteCond...
and so CSF watch this particular file to ban in iptables every single ip in this file.
 
Back
Top