How do I configure apache to log requests in the request URL matches particular regex pattern ?
You need to use the
SetEnvIf directive and add any matching
Request_URI's to a custom log. For example:
SetEnvIf Request_URI /request/to/match$ mycustomlogfile CustomLog mycustomlogfile.log common env=mycustomlogfile
For more specifics on how to use
SetEnvIf, check out this how to page on HowToForge.com How To Tell Apache To Not Log Certain Requests In Its Access Log (Note: Although the tutorial is about not logging certain requests in apache, it's still good information on using