尝试在 .htaccess 中创建重写规则
我有一个类似于
www.myurl.com/page/blog
的网址,它与我当前的重写规则配合得很好。但是当我尝试向其附加附加查询字符串时,它不起作用。
www.myurl.com/page/blog?group=2
是否可以在重写规则中添加一些内容,使其捕获所有其他查询字符串?
这是我目前的规则:
RewriteRule ^page/([^/\.]+)/?$ index.php?page=$1 [L]
I have a url that looks like this
www.myurl.com/page/blog
which works fine with my current rewrite rule. But when I try to append append additional query stings to it it doesn't work.
www.myurl.com/page/blog?group=2
Is there something I could add to my rewrite rule that will make it catch all additional query strings?
This is my current rule:
RewriteRule ^page/([^/\.]+)/?$ index.php?page=$1 [L]
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您需要添加
[QSA]
标志来传递原始查询字符串参数,即You need to add the
[QSA]
flag to pass through the original query string params i.e.