Forum Moderators: phranque
I am using the following code in httpd.conf file to redirect any request using my ExitPage program to an information page:
Options +FollowSymLinks
RewriteEngine On
RewriteCond %{THE_REQUEST} ^.*ExitPage.*$
RewriteRule ^.*$ /LinkTempNotAvailable.html [R,L]
It works but I don't like the fact that original request was also recorded in the log file:
.........
***.***.***.*** - - [31/Mar/2009:17:26:45 -0400] "GET /cgi-bin/ExitPage/MyProgram.cgi?url=http://www.website.com HTTP/1.0" 302 269
.........
Is it possible to get rid of this line? I was not allowed to modify the log file after it was generated.
I am using apache 2.0.59 on Solaris.
Any comments and hits will be appreciated.
Jin
When I add "env=!dontlog" at the end, I got the following error:
"TransferLog takes one argument, the filename of the access log".
I tried to replace TransferLog with CustomLog, But failed also.
Do you have any further comments? Is it possible to use Mod_rewrite to solve my problem?
Thank you again for your time and help.
Jin
Options +FollowSymLinks
RewriteEngine On
RewriteCond %{THE_REQUEST} ^.*ExitPage.*$
RewriteRule ^.*$ /LinkTempNotAvailable.html [[b]E=dontlog:True[/b],R,L]
Thank you for the help and it is working.
Here is the related code I am using in my httpd.conf:
-----------------------------------
LogFormat "%h %v %u %t \"%r\" %>s %b" common
CustomLog "¦/usr/local/sbin/cronolog /var/rithqnuas003/logs/daily/rithqnuas003_01_%Y%m%d.log" common env=!dontlog
.....
.....
Options +FollowSymLinks
RewriteEngine On
RewriteCond %{THE_REQUEST} ^.*ExitPage.*$
RewriteRule ^.*$ /LinkTempNotAvailable.html [E=dontlog:True,R,L]
-----------------------------------
Jin