I have this configuration ...
LogFormat "%v:%p %h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined
LogFormat "%h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%h %l %u %t \"%r\" %>s %O" common
LogFormat "%{Referer}i -> %U" referer
LogFormat "%{User-agent}i" agent
SetEnvIf Request_URI "^/MyUrl1/*" p_myurl1
CustomLog /var/log/apache2/myurl1_access.log common env=p_myurl1
SetEnvIf Request_URI "^/MyUrl2/*" p_myurl2
CustomLog /var/log/apache2/myurl2_access.log common env=p_myurl2
But when the url ...
www.mydomain.com/MyUrl2/blablabla.php
is typed, I want this logged to myurl2_access.log
but it logs to access.log
. Why?