Chinaunix首页 | 论坛 | 博客
  • 博客访问: 2553985
  • 博文数量: 709
  • 博客积分: 12251
  • 博客等级: 上将
  • 技术积分: 7905
  • 用 户 组: 普通用户
  • 注册时间: 2005-07-17 00:00
个人简介

实现有价值的IT服务

文章存档

2012年(7)

2011年(147)

2009年(3)

2008年(5)

2007年(74)

2006年(431)

2005年(42)

分类: 系统运维

2006-04-12 22:28:03

Rewrite-dispatch

From ResinWiki


The directive rewrites and dispatches rules similar to the Apache mod_rewrite module. It can appear in the <> or the <> directives.

Contents

[]

Overview

The directive tries each sub-directive in order for a match. The first matching directive redirects the request.

may occur in a <> or in a <>.

Starting with Resin 3.0.19, may also occur in the <> block. The regexp in that case will be the entire URL, not just the path portion.

[]

Escaping

Since the rewrite rules are written in Resin's XML configuration files, XML escaping rules apply. In particular a & character must be escaped with &

[]

302 Redirecting a URL

To redirect a URL with a HTTP 302 redirect use:


  

[]

301 Permanently Move a URL

To redirect a URL with a HTTP 301 moved-permanently use:


  

(requires Resin 3.0.18)

[]

Forwarding a URL

To internally forward a URL to a target using the Servlet forward() call use:


  

[]

403 Forbidden

To send a HTTP 403 forbidden message for a URL, use:


  

[]

404 Not Found

To send a HTTP 404 Not Found message for a URL, use:


  

[]

410 Gone

To send a HTTP 410 Gone message for a URL, use:


  

阅读(2202) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~