【发布时间】:2010-12-31 00:39:27
【问题描述】:
CheckSpelling On
RewriteEngine on
RewriteCond %{HTTP_HOST} ^([^.]+)\.example\.com$
RewriteCond /home/%1/ -d
RewriteRule ^(.+) %{HTTP_HOST}$1
RewriteRule ^([^.]+)\.example\.com/media/(.*) /home/$1/data/media/$2
RewriteRule ^([^.]+)\.example\.com/(.*) /home/$1/www/$2
CheckSpelling On (mod_speling) 在 www.example.com 时可以正常工作。但是当重写发生时它不起作用。例如有一个/home/test/www/index.html 文件。如果您执行test.example.com/INDEX.html,它不会修复为test.example.com/index.html,但如果您执行www.example.com/INDEX.html(没有/home/www/ 文件夹),它将修复为www.example.com/index.html。
似乎它首先通过 mod_rewrite 处理,如果它使用 rewrite,它不会通过检查拼写。我试过以不同的顺序加载模块,但没有成功。
【问题讨论】:
标签: apache mod-rewrite apache2 case-insensitive mod-speling