URL重写apache2
我如何才能将
anyhost.com/argument1/parameter2/some-text/
重写为
anyhost.com/index.php?path=argument1/parameter2/some-text/
code>
或
anyhost.com/index.php?page=argument1&subpage=parameter2&subsubpage=some-text
或类似的东西?
How would I be able to rewrite
anyhost.com/argument1/parameter2/some-text/
as
anyhost.com/index.php?path=argument1/parameter2/some-text/
or
anyhost.com/index.php?page=argument1&subpage=parameter2&subsubpage=some-text
or anything like that?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
这应该可以做到:
QSA 标志 是自动附加任何查询从原始 URL 到发送到 index.php 的查询字符串的字符串;如果您不需要该功能,可以将其删除。
This should do it:
The QSA flag is to auto-append any query string from the original URL to the query string sent to index.php; you can remove it if you don't need that functionality.
这是第一个版本。
这是第二个。您始终可以使用此工具测试您的重写。
This is for the first version.
This is for the second one. You can always test your rewrites using this tool.