Apache 下忽视大小写,使用module Spelling 会导致301重定向

在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).

也就是说这个问题同文件大小写无关,同文件夹的大小写有关

 

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章