我一直在寻找整个互联网,但我找不到解决方案。
我一直在尝试将查询字符串作为 php 中的另一个 $_GET 值传递。例如localhost/find/book
转换为index.php?url=find/book
但这还不足以达到我的目的。当我尝试做类似localhost/find/book?cols=name,library
我希望将其转换为index.php?url=find/book?cols=name,library
但它转换为index.php?url=find/book
它只是省略第二个查询字符串的事情时。
我很确定几个月前我这样做了,并且奏效了。但现在它只是没有,我不知道为什么。
这是我的重写规则:
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule ^(.*)$ index.php?url=$1 [L,QSA]
提前致谢。