.htaccess 中的 Apache RequestHeader 指令
我正在尝试在 Godaddy 共享主机帐户上使用以下 apache 配置:
<Files ~ ".*">
<IfModule mod_headers.c>
RequestHeader unset Host
RequestHeader append Host mydomain.com
</IfModule>
</Files>
以上内容包含在 .htaccess 文件中。 换句话说......对于所有文件和路径,将请求的主机设置为 mydomain.com
上面似乎不起作用。 我在 Godaddy 的服务器上收到 500 错误。
非常感谢!
I am trying to use the following apache configuration on a Godaddy shared hosting account:
<Files ~ ".*">
<IfModule mod_headers.c>
RequestHeader unset Host
RequestHeader append Host mydomain.com
</IfModule>
</Files>
The above is contained in a .htaccess file.
In other words... For all files and paths set the request's host to mydomain.com
The above doesn't seem to work. I get a 500 error on Godaddy's servers.
Thanks muchly!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这个问题的答案是由 Gumbo 在上面的评论中提供的
The answer to this question was provided by Gumbo in the comments above