PHP Mod_Rewrite
我正在尝试使用 mod_rewrite 来实现以下重写:
从 - http:// pre.domain.com/public/?project=Awesome
到 - http:// pre.domain.com/project/Awesome
似乎无法找出答案(尽管浏览了无数的网站)。有什么帮助吗?
I'm trying to use mod_rewrite to achieve the following rewrite:
From - http:// pre.domain.com/public/?project=Awesome
To - http:// pre.domain.com/project/Awesome
Can't seem to figure it out (despite reading through endless sites). Any help?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
您需要使用 RewriteCond 来匹配查询字符串。
You need to match against the query string using a RewriteCond.
不确定您的网址是否正确,所以我认为您正在尝试这样做:
Not sure you have your URLs around the right way so I think your are trying to do this: