Set Header variable
am 29.08.2007 17:37:01 von sandro.calandrino
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
Re: Set Header variable
am 29.08.2007 18:35:41 von phantom
wrote in message
news:1188401821.817110.79520@22g2000hsm.googlegroups.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}
Re: Set Header variable
am 30.08.2007 11:22:58 von sandro.calandrino
It doesn't work...
On 29 Ago, 18:35, "phantom" wrote:
> wrote in message
>
> news:1188401821.817110.79520@22g2000hsm.googlegroups.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}
Re: Set Header variable
am 30.08.2007 11:28:56 von sandro.calandrino
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" wrote:
> wrote in message
>
> news:1188401821.817110.79520@22g2000hsm.googlegroups.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}