httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Belov, Charles" <Charles.Be...@sfmta.com>
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:
http://www.sfmta.com/cms/cmta_test/documents/3-18-08CurrentFares_test.pd
f?abc
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

Location:
http://www.sfmta.com/cms/cmta_test/documents/3-18-08CurrentFares_test.pd
f

(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:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message