如何将附加 url 参数添加到我的 mod_rewrite 规则中
好的,这就是问题所在,
我有大约 30 个左右的重写规则,如下所示:
RewriteRule ^Frequently-Asked-Questions$ index.cfm?event=faqs-frequently-asked-questions
RewriteRule ^faq/([a-zA-Z0-9_-]+)/([0-9]+)$ index.cfm?event=faq&faqID=$2
所以这很好用,网址如下:
www.example.com/Frequently-Asked-Questions
或 www.example.com/faq/why-wont-this-work/1234
完美运行。
问题是当我们尝试在其顶部添加 URL 参数时,那么
www.example.com/Frequently-Asked-Questions?phoneNum=123-345-2322 doesn't work at all.
我如何在整个网站上普遍添加这些额外的 url 参数呢?
Ok so here is the problem
I have about 30 or so rewrite rules that look like this:
RewriteRule ^Frequently-Asked-Questions$ index.cfm?event=faqs-frequently-asked-questions
RewriteRule ^faq/([a-zA-Z0-9_-]+)/([0-9]+)$ index.cfm?event=faq&faqID=$2
So this works great and urls like:
www.example.com/Frequently-Asked-Questions
or
www.example.com/faq/why-wont-this-work/1234
Work perfectly.
The problem is when we try to add URL parameters on TOP of this, so
www.example.com/Frequently-Asked-Questions?phoneNum=123-345-2322 doesn't work at all.
How can i add these extra url parameters universally across the site?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
添加
QSA
&末尾有L
标志。标记
QSA
Apache 文档标记
L
Apache 文档add the
QSA
&L
flag at the end.Flag
QSA
Apache DocsFlag
L
Apache Docs