apache url 重写问题
是否可以重写以下 URL:
http://dev.aurora.com/problem/getproblems/fieldset/2?search=false&rows=20&page=1
到
http://dev.aurora.com/problem/getproblems/fieldset/2/search/false/rows /20/page/1
提前谢谢
is it possible to rewrite the following URL:
http://dev.aurora.com/problem/getproblems/fieldset/2?search=false&rows=20&page=1
to
http://dev.aurora.com/problem/getproblems/fieldset/2/search/false/rows/20/page/1
Thanx in advance
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
在文档根目录的 .htaccess 文件中尝试这些规则:
第一个规则用于递归,第二个规则结束递归。
Try these rules in the .htaccess file in your document root directory:
The first rule is for the recursion and the second rule ends the recursion.
当然;类似的东西
会起作用,但无论你遵循谁的答案,你总是需要根据你的情况进行调整,所以你需要了解它是如何工作的。
http://httpd.apache.org/docs/2.2/rewrite/ rewrite_intro.html#regex,
http://httpd.apache.org/docs/2.2/mod/mod_rewrite。 html 和
像 http://civilolydnad.se/projects/rewriterule/ 这样的东西会给你带来很大的帮助。
Certainly; something like
will work, but no matter whose answer you follow, you'll always need to tweak it to your situation, so you need to understand how it works.
http://httpd.apache.org/docs/2.2/rewrite/rewrite_intro.html#regex,
http://httpd.apache.org/docs/2.2/mod/mod_rewrite.html and
something like http://civilolydnad.se/projects/rewriterule/ will get you a long way.