Debian Codegraph @

jetty-ee10/jetty-ee10-demos/jetty-ee10-demo-jetty-webapp/src/main/webapp/rewrite/info.html

raw
1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
2 <html>
3 <head>
4 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5 <meta http-equiv="Cache-Control" content="no-cache">
6 <link rel="stylesheet" href="../demo.css"/>
7 <title>RewriteHandler</title>
8 </head>
9 <body>
10 <div class="topnav">
11 <a class="menu" href="http://localhost:8080/">Demo Home</a>
12 <a class="menu" href="https://github.com/jetty/jetty.project/tree/jetty-12.0.x/jetty-ee10/jetty-ee10-demos/jetty-ee10-demo-jetty-webapp/">Source</a>
13 <a class="menu" href="https://jetty.org/">Jetty Project Home</a>
14 <a class="menu" href="https://jetty.org/docs/">Documentation</a>
15 <a class="menu" href="https://webtide.com">Commercial Support</a>
16 </div>
17
18 <div class="content">
19 <h1>Links to test the RewriteHandler</h1>
20 <p>All examples below were configured using <code>etc/jetty-rewrite.xml</code>.</p>
21
22 <h2>Internal URI rewrite</h2>
23 <dl>
24 <dt><a href="../some/old/context">Rewrite "../some/old/context" to "../rewritten/newcontext"</a></dt>
25 <dd>This demo shows how the entire request URI can be internally rewritten to point to another context, using simple text matching</dd>
26
27 <dt><a href="../rewrite/for/beginning">Rewrite "../rewrite/for/beginning" to "../rewritten/beginning"</a></dt>
28 <dd>This demo shows how the beginning of the request URI can be rewritten, while keeping the ending section</dd>
29
30 <dt><a href="../rewritten/reverse/bar/foo">Rewrite "bar/foo" to "foo/bar" using regex</a></dt>
31 <dd>This demo shows how sections of the request URI can be rearranged. It uses regex to parse out each section, and then return them in reverse order</dd>
32
33 <dt><a href="../rewrite/for/reverse/bar/foo">Rewrite the beginning, and reverse the path sections</a></dt>
34 <dd>This demo shows how rewrite patterns can be chained.</dd>
35
36 <dt><a href="../dump/reverse/bar/foo">Rewrite "bar/foo" to "foo/bar", full dump view</a></dt>
37 <dd>This demo rewrites "bar/foo" to "foo/bar" the same as earlier, but shows a full dump of the request</dd>
38
39 <h2>Redirect</h2>
40 <dt><a href="../redirect/this">Redirect "../redirect/this" to "../redirected/this"</a></dt>
41 <dd>This demo redirects the request in a manner visible to the user agent, instead of doing an internal rewrite.</dd>
42
43 <h2>Cookie</h2>
44 <dt>All pages</dt>
45 <dd>This demo rule sets a "visited" cookie for each page you visit. The second time you go to any of the links above, you will see an additional line, "Previously visited: yes".</dd>
46
47 <h2>Response Code</h2>
48 <dt><a href="../400Error">Return a 400 error status</a></dt>
49 <dd>This demo shows how to modify the response code of a page to an error, based on its URL</dd>
50 </dl>
51 </div>
52
53 <div class="footer">
54 <center><a href="https://jetty.org"><img style="border:0" src="../small_powered_by.gif"/></a></center>
55 </div>
56
57
58 </body>
59 </html>