我在重写网址时遇到问题: http://example.com/admin/login指向http://example.com/admin/index.php?a=login
通过这样做,我收到错误400错误请求 我也正在重写我的主页,其工作方式完全相同!
http://example.com/hello成功指向http://example.com/index.php?a=hello
我还确认http://example.com/admin/index.php?a=login可以正常工作!
我正在使用的RewriteRules:
RewriteRule ^admin/(.*)?$ admin/index.php?a=$1 [QSA,NC,L]
让某人想知道我的索引重写是什么样的:
RewriteRule ^(.*)?$ index.php?a=$1 [QSA,NC,L]
我的重写错了吗?或者还有其他什么?