如何绕过 htaccess 规则?
我的 htaccess 文件中有以下代码:
RewriteRule ^([a-zA-Z0-9-z\-]+)/([a-zA-Z0-9-z\-]+)/$ index.php?page=$1&subPage=$2
它工作得很好,但我希望能够采用诸如: 的 url
http://mysite.com/admin/somefolder/index.php?action=test
,并让它绕过重写规则并像平常一样运行。
我不太确定正则表达式是什么。有什么帮助吗?
谢谢!
I have the following code in my htaccess file:
RewriteRule ^([a-zA-Z0-9-z\-]+)/([a-zA-Z0-9-z\-]+)/$ index.php?page=$1&subPage=$2
It works great but I want to be able to take a url such as:
http://mysite.com/admin/somefolder/index.php?action=test
and have it bypass the rewrite rule and behave as it normally would.
I'm not too sure what the regex would be. Any help?
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
使用重写条件来限制规则的应用。
我认为这应该可行:
已经很长一段时间没有搞乱 mod 重写了,所以一定要进行测试。
Use a Rewrite condition to limit the application of the rule.
I think this should work:
Haven't messed with mod rewrite in a long while, so make sure you test.