简体   繁体   English

Apache(2.0)mod_headers是否不输出环境变量?

[英]Apache (2.0) mod_headers not outputting environment variables?

My .htaccess file: 我的.htaccess文件:

Header add X-Hello "time %D"

Now I check to see what it looks like, check out the X-Hello header: 现在,我检查一下外观,检查X-Hello标头:

$curl -v http://foo.com/bar.php
...
< HTTP/1.1 200 OK
< Date: Wed, 06 Oct 2010 20:43:39 GMT
< Server: Apache
< Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
< Expires: Thu, 19 Nov 1981 08:52:00 GMT
< Pragma: no-cache
< Set-Cookie: PHPSESSID=7d32d8fch8qrnnuvoqqopr74c0; path=/
< X-Hello: time %D
< Transfer-Encoding: chunked
< Content-Type: text/html

Which is clearly contrary to the Apache documentation below. 显然与下面的Apache文档相反。 Is there some other directive that mod_headers needs in order to interpolate environment variables? 为了插值环境变量, mod_headers是否还需要其他指令?

http://httpd.apache.org/docs/2.0/mod/mod_headers.html#examples http://httpd.apache.org/docs/2.0/mod/mod_headers.html#examples

除非另有说明,否则托管提供程序承认仍使用Apache 1.3,该版本未对mod_header值进行mod_header

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM