Reputation: 145
is there any way to config htaccess to write to access-log file which is already handled by apache in syntax
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
Need to add more varibale to custom log but dont have access to apache ,
Upvotes: 8
Views: 7857
Reputation: 165471
No.
Documentation clearly says that LogFormat
directive can only be used in Server Config and Virtual Host contexts. This is security restriction, otherwise if your site is hacked (e.g. attacker can create or modify your .htaccess) he will be able to see all requests to your site (the main point here is to protect your visitors even if you do not care about this aspect).
http://httpd.apache.org/docs/current/mod/mod_log_config.html#logformat
Upvotes: 8