Need to add request headers to every request in Apache

Posted by 115748146017471869327 on Server Fault See other posts from Server Fault or by 115748146017471869327
Published on 2010-03-17T20:10:36Z Indexed on 2010/03/17 20:11 UTC
Read the original article Hit count: 623

I'm trying to add a header value to every request via Apache (ver 2.2). I've edited my VirtualHost to include the following vaiations: (I've tried both RequestHeader and Header, add and set in all of these cases)

RequestHeader set X-test_url "Test"

or

<Directory />
  RequestHeader set X-test_url "Test"
</Directory>

or

<Location ~ "/*" >
  RequestHeader set X-test_url "Test"
</Location>

It's hard to explain how I've gotten to this point, but I have to get this done in Apache. Again I'm trying to add the header value to every request. Thanks.

© Server Fault or respective owner

Related posts about apache

Related posts about apache2