导航

用户登录

聚合

聚合内容

在线用户

目前共有 0 位用户0 位游客在线。

lighttpd 重写规则

guoshuang 于 周四, 02/21/2008 - 13:25 提交。

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 于 周四, 02/21/2008 - 13:25 提交。
by guoshuang 2007 with drupal. RSS Sitemap