Request Rewriting用法示例

2009年7月28日 | 分类: 数码前沿 | 标签:

实现目的:访问www.pjnews.cn,自动转向到pjnews.zjol.com.cn

先把 www.pjnews.cn pjnews.zjol.com.cn 绑定到 主机

然后在Rewrite Script写入这段

match IN:Host into $ with ^www\.pjnews\.cn$
if matched then
set OUT:Location = http://pjnews.zjol.com.cn%{URL}
set OUT:Content-Type = text/html
set RESPONSE = 301
set BODY = Moved
goto END
endif

本文的评论功能被关闭了.