2009-11-02 129 views

回答

3

将任何url重写为index.php?q = $ 1会导致内部服务器错误,因为它会创建一个无限循环;反而做这样的事情:

RewriteEngine on 
RewriteCond %{REQUEST_URI} !^/index\.php 
RewriteRule ^(.*)$ index.php?q=$1 [L] 
+0

谢谢,但它是重定向它。有没有任何解决方案,以保持其网址? – 2009-11-02 11:04:27

+0

它不应该重定向它。 – 2009-11-02 14:02:35

+0

你没有在规则中加入[R]吗?如果你这样做,那么它会重定向(因为其他答案说错了)。 – 2009-11-02 14:03:23