Set Header variable

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 ...


Go Back   Usenet Forums > Web Server and Related Forums > Apache Web Server

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 08-29-2007
sandro.calandrino@tiscali.it
 
Posts: n/a
Default 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

  #2 (permalink)  
Old 08-29-2007
phantom
 
Posts: n/a
Default Re: Set Header variable

<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}


  #3 (permalink)  
Old 08-30-2007
sandro.calandrino@tiscali.it
 
Posts: n/a
Default Re: Set Header variable

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}



  #4 (permalink)  
Old 08-30-2007
sandro.calandrino@tiscali.it
 
Posts: n/a
Default 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...@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}



 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 03:50 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0