我想将我的所有网址重定向到www.domain.com
www.domain.com/site-1 must redirect to www.domain.com
www.domain.com/site-2 must redirect to www.domain.com
a.s.o
我试过了:
RewriteEngine On
RewriteRule ^(.*)$ http://www.domain.com/$1 [R=301]
但是当我这样做时,我会被重定向到:http://domain.com/index.php这是一个白页而不是主页
答案 0 :(得分:0)
您可以使用:
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule . http://www.mydomain.co.uk/? [R=301,L]