Apache RewriteRule:保留查询字符串并添加新参数
我不确定这是否是我试图解决的错误的根源,但是,我仍然不确定我是否正确理解了 Apache 文档...
假设我想重定向
toto.page?a=2&c=546EUE&stuff=blah
到
index.page?view=Blahblah/Toto&a=2&c=546EUE&stuff=blah
当然,如果还有其他参数,它们也应该被保留。
下面的规则正确吗?
RewriteRule ^toto\.page$ index.page?view=Blahblah/Toto [NC,QSA,L]
I'm not sure whether this is the origin of the bug I'm trying to solve, however, I'm still not sure I correctly understood Apache doc...
Let's say I wanna redirect
toto.page?a=2&c=546EUE&stuff=blah
to
index.page?view=Blahblah/Toto&a=2&c=546EUE&stuff=blah
Of course, if there was other parameters, they should be preserved too.
Is the following rule correct?
RewriteRule ^toto\.page$ index.page?view=Blahblah/Toto [NC,QSA,L]
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
是的。这是正确的。
Yes. That is correct.