简体   繁体   English

htaccess的“标题设置”给我服务器错误

[英]Htaccess “Header set” gives me server error

This code gives me "Internal Server Error" 此代码给我“内部服务器错误”

Header set x-robots-Tag: "noodp, noarchive"

Some simple mod_rewrite codes work, but this doesn't. 一些简单的mod_rewrite代码可以工作,但是不行。

What am I missing here? 我在这里想念什么?

You don't need the colon ( : ) in there, just the name and value of the header. 你不需要冒号( :在那里,只是名称和标题的值)。

Instead of 代替

Header set x-robots-Tag: "noodp, noarchive"

Try 尝试

Header set x-robots-Tag "noodp, noarchive"

See examples in the Apache 2.2 manual or the 2.4 version , depending which your server has. 请参阅Apache 2.2手册2.4版本 中的示例,具体取决于您的服务器。

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

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