httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Davide Giunchi <>
Subject rewrite SCRIPT_NAME env var
Date Mon, 01 Jul 2002 18:32:02 GMT

I'm trying to rewrite the SCRIPT_NAME environment variable from it's value 
"/" to "/cgi-bin/printenv".
I'm using mod_rewrite and i can easly rewrite variable like LAST_MODIFIED but 
not SCRIPT_NAME; i need to modify it because a non-usual SCRIPT_NAME setting 
make fail a lot of cgi script.
Here it's the rule that i use to modify the LAST_MODIFIED var:

RewriteRule ^/(.*)${HTTP_HOST}/$1 

this works. but if i use:

RewriteRule ^/(.*)${HTTP_HOST}/$1 

the variable will not be modified (i've tryied even with the %{SCRIPT_NAME} 
Yes, i now, there's the SCRIPT_URI var that contain the logical view of the 
script path, but a lot of program use SCRIPT_NAME and i must modify it.
How can i solve this problem ?

Davide Giunchi.
Membro del FoLUG (ForlĂ­ Linux User Group) -
GPG Key available on 
Fingerprint: 4BFF 2682 6A58 ECFE 071B  A1A4 F2A3 9EFA 6494 81FD

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message