Set Header variable

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 [ Mi, 29 August 2007 17:37 ] [ ID #1807819 ]

Re: Set Header variable

<sandro.calandrino [at] tiscali.it> wrote in message
news:1188401821.817110.79520 [at] 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}
phantom [ Mi, 29 August 2007 18:35 ] [ ID #1807822 ]

Re: Set Header variable

It doesn't work...


On 29 Ago, 18:35, "phantom" <nob... [at] blueyonder.invalid> wrote:
> <sandro.calandr... [at] tiscali.it> wrote in message
>
> news:1188401821.817110.79520 [at] 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}
sandro.calandrino [ Do, 30 August 2007 11:22 ] [ ID #1808805 ]

Re: Set Header variable

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... [at] blueyonder.invalid> wrote:
> <sandro.calandr... [at] tiscali.it> wrote in message
>
> news:1188401821.817110.79520 [at] 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}
sandro.calandrino [ Do, 30 August 2007 11:28 ] [ ID #1808806 ]
Webserver » alt.apache.configuration » Set Header variable

Vorheriges Thema: <newbie> what is apache and tomcat?
Nächstes Thema: webdav failing with "Failed to query lock-null status"