This is a discussion on Set Header variable within the Apache Web Server forums, part of the Web Server and Related Forums category; I want to set an Header variable on a Virtual Host configuration. These header variable must be setted with the ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
I want to set an Header variable on a Virtual Host configuration.
These header variable must be setted with the value of an other header variable. For example: I have an header variable named HTTP_USER with the value "MARIO". I want to set an other header variable HTTP_UTENTE with the value of HTTP_USER variable (this value is not static). What can I do? Thanks, Sandro |
|
|||
|
<sandro.calandrino@tiscali.it> wrote in message
news:1188401821.817110.79520@22g2000hsm.googlegrou ps.com... >I want to set an Header variable on a Virtual Host configuration. > These header variable must be setted with the value of an other header > variable. > > For example: I have an header variable named HTTP_USER with the value > "MARIO". I want to set an other header variable HTTP_UTENTE with the > value of HTTP_USER variable (this value is not static). > > What can I do? > What have you tried? does this work? Header add HTTP_UTENTE %{HTTP:HTTP_USER} |
|
|||
|
It doesn't work...
On 29 Ago, 18:35, "phantom" <nob...@blueyonder.invalid> wrote: > <sandro.calandr...@tiscali.it> wrote in message > > news:1188401821.817110.79520@22g2000hsm.googlegrou ps.com... > > >I want to set an Header variable on a Virtual Host configuration. > > These header variable must be setted with the value of an other header > > variable. > > > For example: I have an header variable named HTTP_USER with the value > > "MARIO". I want to set an other header variable HTTP_UTENTE with the > > value of HTTP_USER variable (this value is not static). > > > What can I do? > > What have you tried? > > does this work? > Header add HTTP_UTENTE %{HTTP:HTTP_USER} |
|
|||
|
It doesn't work.
I have an Apache web server used as Reverse-Proxy. This server have to set two variable REMOTE_USER and LOGON_USER with the same value of header variable HTTP_USER. I tried to set these variables using following commands: SetEnvIf HTTP_USER "([a-zA-Z]+)([0-9]+)" uid=$1 SetEnvIf REQUEST_METHOD "[a-z]$" uid=PIPPO RequestHeader add MyHeader-ip $uid RequestHeader add MyNewHeader USER RequestHeader append HTTP_USER "CIAO" RequestHeader add XXX "%{REQUEST_METHOD}e" RequestHeader add XXX1 %{REQUEST_METHOD}e RequestHeader add XXX2 "%D %{uid}e" RequestHeader add HTTP_UTENTE %{HTTP:HTTP_USER}e RequestHeader add HTTP_UTENTE1 %{HTTP:REQUEST_METHOD}e But the result is this: HTTP_MYHEADER_IP $uid HTTP_USER IN00069 HTTP_MYNEWHEADER USER HTTP_HTTP_USER HTTP_XXX (null) HTTP_XXX1 (null) HTTP_XXX2 D=483280 (null) HTTP_HTTP_UTENTE HTTP_HTTP_UTENTE1 On 29 Ago, 18:35, "phantom" <nob...@blueyonder.invalid> wrote: > <sandro.calandr...@tiscali.it> wrote in message > > news:1188401821.817110.79520@22g2000hsm.googlegrou ps.com... > > >I want to set an Header variable on a Virtual Host configuration. > > These header variable must be setted with the value of an other header > > variable. > > > For example: I have an header variable named HTTP_USER with the value > > "MARIO". I want to set an other header variable HTTP_UTENTE with the > > value of HTTP_USER variable (this value is not static). > > > What can I do? > > What have you tried? > > does this work? > Header add HTTP_UTENTE %{HTTP:HTTP_USER} |