.htaccess Mod_Rewrite 适用于多种条件
我正在努力在域根目录的 .htaccess 文件中重写以下 URL。最好的情况是,我收到 500 服务器错误。
来自:http://sub.example.com/a/?id=1234 至:http://sub.example.com/a/1234
来自:http://sub.example.com/a/b/?id=1234 至:http://sub.example.com/a/1234/b
来自什么我读过它应该相当简单,但我似乎无法做任何事情!
I have the following URLs that I'm struggling to rewrite in the .htaccess file in my domain root. At best, I get a 500 Server Error.
From: http://sub.example.com/a/?id=1234
To: http://sub.example.com/a/1234
From: http://sub.example.com/a/b/?id=1234
To: http://sub.example.com/a/1234/b
From what I've read it should be fairly straightforward, but I can't seem to get anything to work!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
试试这个规则:
Try this rule: