且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

通过.htaccess文件所有的PHP脚本中设置HTTP头

更新时间:2023-12-04 23:17:22

如果你想使用的.htaccess做到这一点(或Apache配置),你可以使用的Apache模块mod_headers中,像这样的:

If you want to do this with .htaccess (or in Apache config), you can use Apache module mod_headers, like this:

Header set Cache-Control "no-transform"
Header set Content-Type "application/xhtml+xml; charset=utf-8"

htaccess的设置头一个搜索为您提供了许多这样的例子。

A search on htaccess set header gives you many more examples of this.