Apache的URL重写问题 [英] apache url rewrite problem

查看:179
本文介绍了Apache的URL重写问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是有可能重写以下网址:

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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆