1
我試圖重定向到重寫的URL時遇到問題。 我重寫來自:重定向到重寫的URL問題
www.testdomain.com/index.php?rt=..&id=..
到:
www.testdomain.com/{rt}/{id}
,並試圖從舊的重定向(1)(2)。
在這裏,我的.htaccess文件:
RewriteRule ^(.*)/([0-9]+)/?$ index.php?rt=$1&id=$2 [L]
RewriteCond %{REQUEST_URI} ^/index.php
RewriteCond %{QUERY_STRING} ^rt=(.*)&id=(.*)$
RewriteRule ^(.*)$ http://www.localdomain.com/%1/%2? [R=301,L]
這是我的問題:當我在瀏覽器中運行的我,它扔約重定向循環錯誤。但我不知道如何解決這個錯誤。