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 Onmod_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,它不会通过检查拼写。我试过以不同的顺序加载模块,但没有成功。