【问题标题】:Apache (2.0) mod_headers not outputting environment variables?Apache (2.0) mod_headers 不输出环境变量?
【发布时间】:2010-10-06 20:57:50
【问题描述】:

我的 .htaccess 文件:

Header add X-Hello "time %D"

现在我检查一下它的样子,看看 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

这显然与下面的 Apache 文档相反。 mod_headers 是否需要其他一些指令来插入环境变量?

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

【问题讨论】:

  • 如果它应该被移动,我认为它应该是服务器故障而不是超级用户。

标签: apache http-headers


【解决方案1】:

除非另有说明,托管服务提供商承认仍在使用 Apache 1.3,它不会在 mod_header 中插入值。

【讨论】:

    猜你喜欢
    • 2018-05-15
    • 1970-01-01
    • 2018-10-26
    • 1970-01-01
    • 1970-01-01
    • 2011-02-25
    • 1970-01-01
    • 2017-03-28
    • 2014-03-24
    相关资源
    最近更新 更多