导航
用户登录
最新blog文章
搜索
在线用户
lighttpd 重写规则
url.rewrite-once = ( "" => "" )
rewrites a set of URLs internally in the webserver BEFORE they are handled.
在地址处理前重写地址(地址栏显示地址不重写)
url.rewrite-repeat = ( "" => "" )
The difference between these options is that, while url.rewrite-repeat allows for applying multiple (seperately defined) rewrite rules in a row, url.rewrite-once will cause further rewrite rules to be skipped if the expression was matched.
url.rewrite-repeat 允许多个匹配(或者说允许多次匹配),而 rewrite-once 匹配一次就走掉了。
url.redirect = ( "^/foo" => "http://foo.bar/" )
rewrite 是重写,注意后面的 ,只能是相对路径,如果要跳转到其它网站,要打开
"mod_redirect" 模块,然后
url.redirect = ( "^/abc" => "http://labs.guoshuang.com" )
表示:abc 开头的地址全部跳转到 http://labs.guoshuang.com
其它
url.rewrite: same as url.rewrite-once.
url.rewrite-final: same as url.rewrite-once.
url.rewrite 和 url.rewrite-final 和 url.rewrite-once 作用一样!
- guoshuang 的blog
- 要发表评论,请先登录 或 注册
最新评论
22 周 6 天 前
22 周 6 天 前
22 周 6 天 前
24 周 2 天 前
28 周 4 天 前
28 周 4 天 前
33 周 1 天 前
33 周 1 天 前
35 周 6 天 前
35 周 6 天 前