.htaccess 重写规则正在丢弃我的查询字符串
我的网址就像
http://172.16.3.97:82/shop/t-shirts/full-zip-sweatshirt?options=367:731,368:737,369:741&custom_inscription=test
我写的重写规则,就像
RewriteRule ^shop/t-shirts/([a-zA-Z0-9\-@]+)\?*$ shop/product?path=35&product_id=$1&test=$2
我在 $_GET
中只得到 full-zip-sweatshirt
但我无法获取其他参数。
我应该如何在 .htaccess 中编写规则?
My URL is like
http://172.16.3.97:82/shop/t-shirts/full-zip-sweatshirt?options=367:731,368:737,369:741&custom_inscription=test
and I wrote rewrite rule like
RewriteRule ^shop/t-shirts/([a-zA-Z0-9\-@]+)\?*$ shop/product?path=35&product_id=$1&test=$2
I got only full-zip-sweatshirt
in $_GET
but I am not able to get other parameters.
How should I write Rule in .htaccess ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
尝试更改您的重写规则:
标志“QSA”将原始查询字符串添加到您的查询中
或者也许这个也应该有所帮助:
Try to change your rewrite rule for this :
The flag "QSA" add the original query string to your query
Or maybe this one should also help :