不区分大小写的网址与mod_rewrite的 [英] Case Insensitive URLs with mod_rewrite
问题描述
我想为如果存在这些文件不击中现有的文件,这样做对其他可能的情况下,查找和看到任何网址,而且如果是这样,302到它们。
如果这是不可能的,那么我确定这些妥协:
- 只有选中小写版本
- 只检查第一路部分
例如 http://example.com/CoOl/PaTH/CaMELcaSE 应该重定向到的http://example.com/cool/path/camelCase (假设后者存在)。
但当然是一个完整的解决方案是更为有用我和其他人
CheckSpelling上
匹配的文件和目录。详情请参阅文档。
I'd like for any url that doesn't hit an existing file, to do a lookup on the other possible cases and see if those files exist, and if so, 302 to them.
If that's not possible, then I'm ok with these compromises:
- Only check the lowercase version
- Only check the first path portion
For example http://example.com/CoOl/PaTH/CaMELcaSE should redirect to http://example.com/cool/path/camelCase (assuming the latter exists).
but of course a full solution is much more useful to me and others
CheckSpelling on
Matches files and directories. See the documentation for details.
这篇关于不区分大小写的网址与mod_rewrite的的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!