-
2008-09-18 @ Tag 服务器 人气:1
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 作用一样!
