httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Belov, Charles" <>
Subject [users@httpd] mod_headers not echoing environment variables
Date Sat, 05 Feb 2011 03:04:42 GMT
In response to a request for the file:
with the following directive in .htaccess in the same folder

Header set Location "http://%{SERVER_NAME}e%{REQUEST_URI}e"

httpd 2.2 is serving the following header:

Location: http://(null)(null)

How do I get these two variables into my header so that the header reads


(without the ?abc)

The documentation for mod_headers doesn't list the specific environment
variables that it supports; I got SERVER_NAME and REQUEST_URL from the
mod_rewrite documentation (although apparently mod_headers requires the
trailing e and mod_rewrite doesn't).

I checked the FAQ.  Nothing related.

A Google search for this issue turned up the same issue for Apache 2.2,
in which someone  got (null) in place of a desired environmental
variable.  Someone suggested adding RewriteEngine On above the header
command.  I tried that with no change in results.

Thanks for any assistance.

Charles Belov
SFMTA Webmaster

The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message