HTACCESS url 重写
我正在尝试重写这个网址,但它似乎不起作用,我不清楚出了什么问题
我想要这个网址:
www.mysite.com/dvd-123/Studio/studio_name.php?thumbs=yes&order=price
实际发送到:
www.mysite/cat/list_products.php?studio=123&store=dvd&thumbs=yes&order=price
这是我所拥有的正在工作的内容:
RewriteRule ^dvd-([0-9]+)/Studio/(.*)\.php?(.*)$ cat/list_products.php?studio=$1&store=dvd&$3 [L]
我收到的结果就像我想要的一样: www.mysite/cat/list_products.php?studio=123&store=dvd 忽略: &thumbs=yes$order=price
预先感谢您的帮助!
I am trying to rewrite this url and it just doesn't seem to be working and I am unclear what is going wrong
I want this URL:
www.mysite.com/dvd-123/Studio/studio_name.php?thumbs=yes&order=price
To actually send to:
www.mysite/cat/list_products.php?studio=123&store=dvd&thumbs=yes&order=price
Here is what I have that is sorta working:
RewriteRule ^dvd-([0-9]+)/Studio/(.*)\.php?(.*)$ cat/list_products.php?studio=$1&store=dvd&$3 [L]
The results I am receiving are the same as if i want to:
www.mysite/cat/list_products.php?studio=123&store=dvd
ignoring the:
&thumbs=yes$order=price
Thank you in advance for your help!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
来自 Apache 文档:
我还没有对此进行测试,但希望它能为您指明正确的方向。
From Apache documentation:
I haven't tested this, but hopefully it should point you in the right direction.
你需要逃避斜杠。
You need to escape the slashes.