httpd-users mailing list archives

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

Hello.
I'm trying to rewrite the SCRIPT_NAME environment variable from it's value 
"/~www.example.com/cgi-bin/printenv" 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://62.149.128.47/~%{HTTP_HOST}/$1 
[E=LAST_MODIFIED:/$1,PT]

this works. but if i use:

RewriteRule ^/(.*)$          http://62.149.128.47/~%{HTTP_HOST}/$1 
[E=SCRIPT_NAME:/$1,PT]

the variable will not be modified (i've tryied even with the %{SCRIPT_NAME} 
notation).
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 ?

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

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message