我想不出一种方法来阻止这个 htaccess 重定向循环。
Options +FollowSymLinks
Options -Multiviews
RewriteOptions MaxRedirects=1
RewriteEngine On
RewriteRule ^pages/?$ page.php?p=g&id=1$1 [L,QSA]
RewriteCond %{QUERY_STRING} ^p=g&id=1$ [NC]
RewriteRule ^page\.php$ /pages/? [r=301,nc]
现在它只是循环,直到浏览器说“这个网页有一个重定向循环”。浏览器上的地址栏至少显示正确的地址..
是否可以阻止它循环播放?
我试过RewriteOptions MaxRedirects=1
了:没有成功。
我想要它,所以任何指向 /page.php?p=g&id=1 的链接都重定向到 /pages/
谢谢。