我想要做的是将所有不存在的URLS重定向到index.php?q=%URL%,例如:
www.example.com/ggg将重定向到www.example.com/index.php?q=ggg
然而,我希望地址栏仍然显示www.example.com/ggg。
到目前为止我得到的是:
Options +FollowSymLinks
RewriteEngine On
# redirect all requests to non-existing resources to special handler
RewriteCond %{REQUEST_FILENAME} !-f
RewriteC
我的.htaccess目前使用以下重写规则具有以下行为:
https://example.com/abcd?lol=true
如果存在文件,则打开https://example.com/abcd.php?lol=trueif目录和文件/abcd/index.php,打开https://example.com/abcd/index.php?lol=trueelse打开https://example.com/index.php?lol=true。
->在所有三种情况下,地址栏仍必须显示https://example.com/abcd?lol=true
RewriteEngine On
Re