I have a fairly high traffic web server and would like to squeeze some micro optimization out of it.
In Apache's config I have:
SetEnvIfNoCase Request_URI "\.a?png$" dontlog SetEnvIfNoCase Request_URI "\.bmp$" dontlog SetEnvIfNoCase Request_URI "\.css$" dontlog ...several more I'd like to achieve this (pseudo-code):
<If env=!dontlog> SetEnvIfNoCase Request_URI "\.a?png$" dontlog </If> <If env=!dontlog> SetEnvIfNoCase Request_URI "\.bmp$" dontlog </If> <If env=!dontlog> SetEnvIfNoCase Request_URI "\.css$" dontlog </If> ...several more Performing a config test using my pseudo-code results in:
AH00526: Syntax error on line 260 of C:/apache24/conf/httpd.conf: Cannot parse condition clause: syntax error, unexpected T_OP_STR_EQ, expecting '('
Note:
Please ignore the regex triviality of the examples. How can I perform short-circuiting?