Bug 46650 - CustomLog enviroment condition SCRIPT_FILENAME
Summary: CustomLog enviroment condition SCRIPT_FILENAME
Status: REOPENED
Alias: None
Product: Apache httpd-2
Classification: Unclassified
Component: mod_log_config (show other bugs)
Version: 2.2.11
Hardware: PC Linux
: P2 normal (vote)
Target Milestone: ---
Assignee: Apache HTTPD Bugs Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-02-02 13:38 UTC by Gabor M.
Modified: 2009-07-13 10:57 UTC (History)
1 user (show)



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Gabor M. 2009-02-02 13:38:16 UTC
the following condition is not coming true when the url is rewritted:

CustomLog /var/log/apache2/access.log extra env=SCRIPT_FILENAME

so the request is logged only when i call the index.php directly.

i'm using these rewrite rules:

  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteCond %{REQUEST_URI} !=/favicon.ico
  RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
Comment 1 Gabor M. 2009-02-02 13:40:32 UTC
but this request is not will be logged:

http://localhost/foo
Comment 2 Dan Poirier 2009-03-20 11:15:53 UTC
This is not a user support forum.  If you're having trouble configuring Apache, you should use the user email list to ask for help.  Explain there what you're trying to do, what you've tried, what you think it should do, why you think that, and what it does instead.
Comment 3 Gabor M. 2009-04-29 05:59:37 UTC
i see the SCRIPT_FILENAME has a value.

LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" \"%{Cookie}i\" \"%{Content-Type}o\" \"%{SCRIPT_FILENAME}e\"" extra

but the condition is not coming true:

CustomLog /var/log/apache2/access.log extra env=SCRIPT_FILENAME

i think it's a bug.
Comment 4 Gabor M. 2009-07-13 09:43:43 UTC
sorry.

  RewriteEngine On
  RewriteCond %{REQUEST_URI} !=/favicon.ico
  RewriteRule ^(.*)$ /index.php?q=$1 [L,QSA]
Comment 5 Gabor M. 2009-07-13 10:57:53 UTC
sorry but i reopen this bug again.

The logging is don't work if the RewriteRule is _in the .htaccess_ !!!

.htaccess:

  RewriteEngine on
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteCond %{REQUEST_URI} !=/favicon.ico
  RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]

apache.conf:

  CustomLog /var/log/apache2/test.log extra env=SCRIPT_FILENAME

If you will try access any url except index.php you will be redirected to index.php but the requst will not be logged!