在Apache 下如果load module Spelling 的话
对应的目录如果有大小写区分,则会导致服务器下发多一次301
例如目录如果是js 则正常访问

而如果目录是Js的话:

Js目录下的所有文件全部被301 重定向一次;
对于服务器造成了太多的请求
所以,建议千万不要在apache 中打开 忽视大小写的
Checkspelling on 开关
补充:
Apache 官方提到了这个问题 :http://httpd.apache.org/docs/trunk/mod/mod_speling.html
If, after scanning the directory,
only one document is found that "almost" matches the request, then it is returned in the form of a redirection response (301 - Moved Permanently).
也就是说这个问题同文件大小写无关,同文件夹的大小写有关
在Apache服务器中,如果启用了忽视大小写的Checkspellingon开关,可能会导致目录大小写不匹配时,服务器下发301重定向,增加额外请求。文章详细解释了这一问题,并引用了Apache官方文档说明,指出这与文件夹的大小写有关。
468

被折叠的 条评论
为什么被折叠?



