Changed ProxyPass
[hcoop/domtool2.git] / lib / mod_rewrite.dtl
1 {{Support for Apache's mod_rewrite, which allows fancy mappings from URLs to
2 resources}}
3
4 extern type redirect_code;
5 {{An HTTP code to return as part of a redirection}}
6 extern val temp : redirect_code;
7 extern val permanent : redirect_code;
8 extern val seeother : redirect_code;
9 extern val redir300 : redirect_code;
10 extern val redir301 : redirect_code;
11 extern val redir302 : redirect_code;
12 extern val redir303 : redirect_code;
13 extern val redir304 : redirect_code;
14 extern val redir305 : redirect_code;
15 extern val redir307 : redirect_code;
16
17 extern type rewrite_arg;
18 {{Some mod_rewrite flags take arguments.
19 This type stands for values that may validly be given for one of those
20 arguments, which excludes commas and some other characters.}}
21
22 extern type mod_rewrite_flag;
23 {{See <a href="http://httpd.apache.org/docs/2.0/mod/mod_rewrite.html#rewriterule">the
24 Apache documentation</a> for information on what these flags mean.}}
25
26 extern val redirect : mod_rewrite_flag;
27 extern val forbidden : mod_rewrite_flag;
28 extern val gone : mod_rewrite_flag;
29 extern val last : mod_rewrite_flag;
30 extern val chain : mod_rewrite_flag;
31 extern val nosubreq : mod_rewrite_flag;
32 extern val nocase : mod_rewrite_flag;
33 extern val qsappend : mod_rewrite_flag;
34 extern val noescape : mod_rewrite_flag;
35 extern val passthrough : mod_rewrite_flag;
36
37 extern val mimeType : rewrite_arg -> mod_rewrite_flag;
38 extern val redirectWith : redirect_code -> mod_rewrite_flag;
39 extern val skip : int -> mod_rewrite_flag;
40 extern val env : rewrite_arg -> rewrite_arg -> mod_rewrite_flag;
41
42 extern type mod_rewrite_cond_flag;
43 {{See <a href="http://httpd.apache.org/docs/2.0/mod/mod_rewrite.html#rewritecond">the
44 Apache documentation</a> for information on what these flags mean.}}
45
46 extern val cond_nocase : mod_rewrite_cond_flag;
47 extern val ornext : mod_rewrite_cond_flag;
48
49 extern val rewriteRule : no_spaces -> no_spaces -> [mod_rewrite_flag] -> [Vhost];
50 {{See <a href="http://httpd.apache.org/docs/2.0/mod/mod_rewrite.html#rewriterule">Apache
51 documentation for <tt>RewriteRule</tt></a>.}}
52
53 extern val rewriteCond: no_spaces -> no_spaces -> [mod_rewrite_cond_flag] -> [Vhost];
54 {{See <a href="http://httpd.apache.org/docs/2.0/mod/mod_rewrite.html#rewritecond">Apache
55 documentation for <tt>RewriteCond</tt></a>.}}
56
57 extern type proxy_port;
58 {{A port number above 1024}}
59
60 extern val localProxyRewrite : no_spaces -> no_spaces -> proxy_port -> [Vhost];
61 {{All requests matching the regular expression in the first argument are
62 redirected to another HTTPD running on localhost at the given port, generating
63 the new URI by substituting variables in the second argument as per Apache
64 mod_rewrite.}}
65