RewriteEngine on
RewriteCond %{REQUEST_URI} !^/index\.php
RewriteRule ^(.*)$ index.php?q=$1 [L]
这应该将任何 url 重写为 index.php?q={url},并且它正在工作。无论如何,http://www.domain.com/
只显示一个空白页。如何将 / 重写为 index.php?(http://www.domain.co.il/index.php
不要显示空白页..)
BTW:这段代码是重定向而不是重写,为什么呢?
谢谢。