Apache的URL重写问题 [英] apache url rewrite problem
问题描述
是有可能重写以下网址:
is it possible to rewrite the following 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
感谢名单提前
推荐答案
当然,像
^(.*)\?(search)=(.+)&(rows)=(.+)&(page)=(.+)$ $1/$2/$3/$4/$5/$6/$7
将工作,但无论是谁的答案你跟着,你总是需要将其调整到你的情况,所以你需要了解它是如何工作的。
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_intro.html#正则表达式,
http://httpd.apache.org/docs/2.2/mod/mod_rewrite.html 并
像 http://civilolydnad.se/projects/rewriterule/ 将让你很长的路要走。
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.
这篇关于Apache的URL重写问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!