如果我去http://www.example.com
我希望它留在那裏,這是工作正常。
如果我去http://bar.example.com
它重定向到http://www..com
,這是不對的
我想它去http://www.example.com
給出的RewriteCond
RewriteCond反向引用不起作用
RewriteEngine On RewriteCond %{HTTP_HOST} !^$ RewriteCond %{HTTP_HOST} !^www.(example).com [NC] RewriteRule ^(.*) http://www.%1.com/$1 [L,R]
的Ubuntu 8.04
包反向引用:Apache2的-MPM-prefork的
建築:i386
版本:2.2.8-1
啊否定模式。現在一切都說得通了。謝謝! – er1234 2009-10-09 15:09:50