http://wiki3.caucho.com/index.php?title=Rewrite-dispatch&feed=atom&action=historyRewrite-dispatch - Revision history2024-03-29T12:23:17ZRevision history for this page on the wikiMediaWiki 1.18.0http://wiki3.caucho.com/index.php?title=Rewrite-dispatch&diff=3192&oldid=prevFerg at 08:55, 14 January 20092009-01-14T08:55:22Z<p></p>
<table class='diff diff-contentalign-left'>
<col class='diff-marker' />
<col class='diff-content' />
<col class='diff-marker' />
<col class='diff-content' />
<tr valign='top'>
<td colspan='2' style="background-color: white; color:black;">← Older revision</td>
<td colspan='2' style="background-color: white; color:black;">Revision as of 08:55, 14 January 2009</td>
</tr><tr><td colspan="2" class="diff-lineno">Line 1:</td>
<td colspan="2" class="diff-lineno">Line 1:</td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>[[Category:Configuration]]</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>[[Category:Configuration]]</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del class="diffchange diffchange-inline">The </del><rewrite-dispatch> directive rewrites and dispatches rules similar to the Apache mod_rewrite module.  It can appear in the <[[host]]> or the <[[web-app]]> directives.</div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins class="diffchange diffchange-inline">Resin's </ins><rewrite-dispatch> directive rewrites and dispatches rules similar to the Apache mod_rewrite module.  It can appear in the <[[host]]> or the <[[web-app]]> directives.</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>== Overview ==</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>== Overview ==</div></td></tr>
</table>Ferghttp://wiki3.caucho.com/index.php?title=Rewrite-dispatch&diff=2347&oldid=prevSam at 21:07, 10 April 20062006-04-10T21:07:26Z<p></p>
<table class='diff diff-contentalign-left'>
<col class='diff-marker' />
<col class='diff-content' />
<col class='diff-marker' />
<col class='diff-content' />
<tr valign='top'>
<td colspan='2' style="background-color: white; color:black;">← Older revision</td>
<td colspan='2' style="background-color: white; color:black;">Revision as of 21:07, 10 April 2006</td>
</tr><tr><td colspan="2" class="diff-lineno">Line 13:</td>
<td colspan="2" class="diff-lineno">Line 13:</td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>=== Escaping ===</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>=== Escaping ===</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div>Since the rewrite rules are written in Resin's XML configuration files, XML escaping rules apply.  In particular a &amp; character must be escaped <del class="diffchange diffchange-inline">wiht </del>&amp;amp;</div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div>Since the rewrite rules are written in Resin's XML configuration files, XML escaping rules apply.  In particular a &amp; character must be escaped <ins class="diffchange diffchange-inline">with </ins>&amp;amp;</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>== 302 Redirecting a URL ==</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>== 302 Redirecting a URL ==</div></td></tr>
</table>Samhttp://wiki3.caucho.com/index.php?title=Rewrite-dispatch&diff=2346&oldid=prevSam at 21:07, 10 April 20062006-04-10T21:07:08Z<p></p>
<table class='diff diff-contentalign-left'>
<col class='diff-marker' />
<col class='diff-content' />
<col class='diff-marker' />
<col class='diff-content' />
<tr valign='top'>
<td colspan='2' style="background-color: white; color:black;">← Older revision</td>
<td colspan='2' style="background-color: white; color:black;">Revision as of 21:07, 10 April 2006</td>
</tr><tr><td colspan="2" class="diff-lineno">Line 9:</td>
<td colspan="2" class="diff-lineno">Line 9:</td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div><rewrite-dispatch> may occur in a <[[host]]> or in a <[[web-app]]>.</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div><rewrite-dispatch> may occur in a <[[host]]> or in a <[[web-app]]>.</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del class="diffchange diffchange-inline">In </del>Resin 3.0.19, <rewrite-dispatch> may also occur in the <[[server]]> block.  The regexp in that case will be the entire URL, not just the path portion.</div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins class="diffchange diffchange-inline">Starting with </ins>Resin 3.0.19, <rewrite-dispatch> may also occur in the <[[server]]> block.  The regexp in that case will be the entire URL, not just the path portion.</div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div> </div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins class="diffchange diffchange-inline">=== Escaping ===</ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div> </div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins class="diffchange diffchange-inline">Since the rewrite rules are written in Resin's XML configuration files, XML escaping rules apply.  In particular a &amp; character must be escaped wiht &amp;amp;</ins></div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>== 302 Redirecting a URL ==</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>== 302 Redirecting a URL ==</div></td></tr>
</table>Samhttp://wiki3.caucho.com/index.php?title=Rewrite-dispatch&diff=2290&oldid=prevFerg at 18:32, 29 March 20062006-03-29T18:32:40Z<p></p>
<table class='diff diff-contentalign-left'>
<col class='diff-marker' />
<col class='diff-content' />
<col class='diff-marker' />
<col class='diff-content' />
<tr valign='top'>
<td colspan='2' style="background-color: white; color:black;">← Older revision</td>
<td colspan='2' style="background-color: white; color:black;">Revision as of 18:32, 29 March 2006</td>
</tr><tr><td colspan="2" class="diff-lineno">Line 7:</td>
<td colspan="2" class="diff-lineno">Line 7:</td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>The <rewrite-dispatch> directive tries each sub-directive in order for a [[regular expression]] match.  The first matching directive redirects the request.</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>The <rewrite-dispatch> directive tries each sub-directive in order for a [[regular expression]] match.  The first matching directive redirects the request.</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><rewrite-dispatch> may occur in a <host> or in a <web-app>.</div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><rewrite-dispatch> may occur in a <<ins class="diffchange diffchange-inline">[[</ins>host<ins class="diffchange diffchange-inline">]]</ins>> or in a <<ins class="diffchange diffchange-inline">[[</ins>web-app<ins class="diffchange diffchange-inline">]]</ins>>.</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div>In Resin 3.0.19, <rewrite-dispatch> may also occur in the <server> block.  The regexp in that case will be the entire URL, not just the path portion.</div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div>In Resin 3.0.19, <rewrite-dispatch> may also occur in the <<ins class="diffchange diffchange-inline">[[</ins>server<ins class="diffchange diffchange-inline">]]</ins>> block.  The regexp in that case will be the entire URL, not just the path portion.</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>== 302 Redirecting a URL ==</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>== 302 Redirecting a URL ==</div></td></tr>
</table>Ferghttp://wiki3.caucho.com/index.php?title=Rewrite-dispatch&diff=2289&oldid=prevFerg at 18:32, 29 March 20062006-03-29T18:32:13Z<p></p>
<table class='diff diff-contentalign-left'>
<col class='diff-marker' />
<col class='diff-content' />
<col class='diff-marker' />
<col class='diff-content' />
<tr valign='top'>
<td colspan='2' style="background-color: white; color:black;">← Older revision</td>
<td colspan='2' style="background-color: white; color:black;">Revision as of 18:32, 29 March 2006</td>
</tr><tr><td colspan="2" class="diff-lineno">Line 6:</td>
<td colspan="2" class="diff-lineno">Line 6:</td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>The <rewrite-dispatch> directive tries each sub-directive in order for a [[regular expression]] match.  The first matching directive redirects the request.</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>The <rewrite-dispatch> directive tries each sub-directive in order for a [[regular expression]] match.  The first matching directive redirects the request.</div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins style="color: red; font-weight: bold; text-decoration: none;"></ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins style="color: red; font-weight: bold; text-decoration: none;"><rewrite-dispatch> may occur in a <host> or in a <web-app>.</ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins style="color: red; font-weight: bold; text-decoration: none;"></ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins style="color: red; font-weight: bold; text-decoration: none;">In Resin 3.0.19, <rewrite-dispatch> may also occur in the <server> block.  The regexp in that case will be the entire URL, not just the path portion.</ins></div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>== 302 Redirecting a URL ==</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>== 302 Redirecting a URL ==</div></td></tr>
</table>Ferghttp://wiki3.caucho.com/index.php?title=Rewrite-dispatch&diff=2068&oldid=prevSam: renamed tag to directive2006-02-21T20:23:14Z<p>renamed tag to directive</p>
<table class='diff diff-contentalign-left'>
<col class='diff-marker' />
<col class='diff-content' />
<col class='diff-marker' />
<col class='diff-content' />
<tr valign='top'>
<td colspan='2' style="background-color: white; color:black;">← Older revision</td>
<td colspan='2' style="background-color: white; color:black;">Revision as of 20:23, 21 February 2006</td>
</tr><tr><td colspan="2" class="diff-lineno">Line 1:</td>
<td colspan="2" class="diff-lineno">Line 1:</td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>[[Category:Configuration]]</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>[[Category:Configuration]]</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div>The <rewrite-dispatch> <del class="diffchange diffchange-inline">tag </del>rewrites and dispatches rules similar to the Apache mod_rewrite module.  It can appear in the <[[host]]> or the <[[web-app]]> <del class="diffchange diffchange-inline">tags</del>.</div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div>The <rewrite-dispatch> <ins class="diffchange diffchange-inline">directive </ins>rewrites and dispatches rules similar to the Apache mod_rewrite module.  It can appear in the <[[host]]> or the <[[web-app]]> <ins class="diffchange diffchange-inline">directives</ins>.</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>== Overview ==</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>== Overview ==</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div>The <rewrite-dispatch> <del class="diffchange diffchange-inline">tag </del>tries each sub-<del class="diffchange diffchange-inline">tag </del>in order for a [[regular expression]] match.  The first matching <del class="diffchange diffchange-inline">tag </del>redirects the request.</div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div>The <rewrite-dispatch> <ins class="diffchange diffchange-inline">directive </ins>tries each sub-<ins class="diffchange diffchange-inline">directive </ins>in order for a [[regular expression]] match.  The first matching <ins class="diffchange diffchange-inline">directive </ins>redirects the request.</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>== 302 Redirecting a URL ==</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>== 302 Redirecting a URL ==</div></td></tr>
</table>Samhttp://wiki3.caucho.com/index.php?title=Rewrite-dispatch&diff=1772&oldid=prevFerg at 20:24, 12 January 20062006-01-12T20:24:43Z<p></p>
<table class='diff diff-contentalign-left'>
<col class='diff-marker' />
<col class='diff-content' />
<col class='diff-marker' />
<col class='diff-content' />
<tr valign='top'>
<td colspan='2' style="background-color: white; color:black;">← Older revision</td>
<td colspan='2' style="background-color: white; color:black;">Revision as of 20:24, 12 January 2006</td>
</tr><tr><td colspan="2" class="diff-lineno">Line 7:</td>
<td colspan="2" class="diff-lineno">Line 7:</td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>The <rewrite-dispatch> tag tries each sub-tag in order for a [[regular expression]] match.  The first matching tag redirects the request.</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>The <rewrite-dispatch> tag tries each sub-tag in order for a [[regular expression]] match.  The first matching tag redirects the request.</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div>== Redirecting a URL ==</div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div>== <ins class="diffchange diffchange-inline">302 </ins>Redirecting a URL ==</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>To redirect a URL with a HTTP 302 redirect use:</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>To redirect a URL with a HTTP 302 redirect use:</div></td></tr>
<tr><td colspan="2" class="diff-lineno">Line 15:</td>
<td colspan="2" class="diff-lineno">Line 15:</td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>  </rewrite-dispatch></div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>  </rewrite-dispatch></div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div>== Permanently Move a URL ==</div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div>== <ins class="diffchange diffchange-inline">301 </ins>Permanently Move a URL ==</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>To redirect a URL with a HTTP 301 moved-permanently use:</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>To redirect a URL with a HTTP 301 moved-permanently use:</div></td></tr>
</table>Ferghttp://wiki3.caucho.com/index.php?title=Rewrite-dispatch&diff=1771&oldid=prevFerg at 20:24, 12 January 20062006-01-12T20:24:20Z<p></p>
<table class='diff diff-contentalign-left'>
<col class='diff-marker' />
<col class='diff-content' />
<col class='diff-marker' />
<col class='diff-content' />
<tr valign='top'>
<td colspan='2' style="background-color: white; color:black;">← Older revision</td>
<td colspan='2' style="background-color: white; color:black;">Revision as of 20:24, 12 January 2006</td>
</tr><tr><td colspan="2" class="diff-lineno">Line 14:</td>
<td colspan="2" class="diff-lineno">Line 14:</td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>   <redirect regexp='^/foo' target='/bar'/></div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>   <redirect regexp='^/foo' target='/bar'/></div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>  </rewrite-dispatch></div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>  </rewrite-dispatch></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins style="color: red; font-weight: bold; text-decoration: none;"></ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins style="color: red; font-weight: bold; text-decoration: none;">== Permanently Move a URL ==</ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins style="color: red; font-weight: bold; text-decoration: none;"></ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins style="color: red; font-weight: bold; text-decoration: none;">To redirect a URL with a HTTP 301 moved-permanently use:</ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins style="color: red; font-weight: bold; text-decoration: none;"></ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins style="color: red; font-weight: bold; text-decoration: none;"> <rewrite-dispatch></ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins style="color: red; font-weight: bold; text-decoration: none;">  <moved-permanently regexp='^/foo' target='/bar'/></ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins style="color: red; font-weight: bold; text-decoration: none;"> </rewrite-dispatch></ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins style="color: red; font-weight: bold; text-decoration: none;"></ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins style="color: red; font-weight: bold; text-decoration: none;">(requires Resin 3.0.18)</ins></div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>== Forwarding a URL ==</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>== Forwarding a URL ==</div></td></tr>
</table>Ferghttp://wiki3.caucho.com/index.php?title=Rewrite-dispatch&diff=1441&oldid=prevFerg at 16:26, 30 November 20052005-11-30T16:26:03Z<p></p>
<table class='diff diff-contentalign-left'>
<col class='diff-marker' />
<col class='diff-content' />
<col class='diff-marker' />
<col class='diff-content' />
<tr valign='top'>
<td colspan='2' style="background-color: white; color:black;">← Older revision</td>
<td colspan='2' style="background-color: white; color:black;">Revision as of 16:26, 30 November 2005</td>
</tr><tr><td colspan="2" class="diff-lineno">Line 2:</td>
<td colspan="2" class="diff-lineno">Line 2:</td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>The <rewrite-dispatch> tag rewrites and dispatches rules similar to the Apache mod_rewrite module.  It can appear in the <[[host]]> or the <[[web-app]]> tags.</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>The <rewrite-dispatch> tag rewrites and dispatches rules similar to the Apache mod_rewrite module.  It can appear in the <[[host]]> or the <[[web-app]]> tags.</div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins style="color: red; font-weight: bold; text-decoration: none;"></ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins style="color: red; font-weight: bold; text-decoration: none;">== Overview ==</ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins style="color: red; font-weight: bold; text-decoration: none;"></ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins style="color: red; font-weight: bold; text-decoration: none;">The <rewrite-dispatch> tag tries each sub-tag in order for a [[regular expression]] match.  The first matching tag redirects the request.</ins></div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>== Redirecting a URL ==</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>== Redirecting a URL ==</div></td></tr>
</table>Ferghttp://wiki3.caucho.com/index.php?title=Rewrite-dispatch&diff=1440&oldid=prevFerg at 16:21, 30 November 20052005-11-30T16:21:33Z<p></p>
<p><b>New page</b></p><div>[[Category:Configuration]]<br />
<br />
The <rewrite-dispatch> tag rewrites and dispatches rules similar to the Apache mod_rewrite module. It can appear in the <[[host]]> or the <[[web-app]]> tags.<br />
<br />
== Redirecting a URL ==<br />
<br />
To redirect a URL with a HTTP 302 redirect use:<br />
<br />
<rewrite-dispatch><br />
<redirect regexp='^/foo' target='/bar'/><br />
</rewrite-dispatch><br />
<br />
== Forwarding a URL ==<br />
<br />
To internally forward a URL to a target using the Servlet forward() call use:<br />
<br />
<rewrite-dispatch><br />
<forward regexp='^/foo' target='/bar'/><br />
</rewrite-dispatch><br />
<br />
== 403 Forbidden ==<br />
<br />
To send a HTTP 403 forbidden message for a URL, use:<br />
<br />
<rewrite-dispatch><br />
<forbidden regexp="^/foo"/><br />
</rewrite-dispatch><br />
<br />
== 404 Not Found ==<br />
<br />
To send a HTTP 404 Not Found message for a URL, use:<br />
<br />
<rewrite-dispatch><br />
<not-found regexp="^/foo"/><br />
</rewrite-dispatch><br />
<br />
== 410 Gone ==<br />
<br />
To send a HTTP 410 Gone message for a URL, use:<br />
<br />
<rewrite-dispatch><br />
<gone regexp="^/foo"/><br />
</rewrite-dispatch></div>Ferg