7e002f80dfe66ad42a18bc6bea422332a08ab76e
[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 extern val notfound : redirect_code;
17 {{Return 404 Not Found}}
18
19 extern type rewrite_arg;
20 {{Some mod_rewrite flags take arguments.
21 This type stands for values that may validly be given for one of those
22 arguments, which excludes commas and some other characters.}}
23
24 extern type mod_rewrite_flag;
25 {{See <a href="http://httpd.apache.org/docs/2.2/mod/mod_rewrite.html#rewriterule">the
26 Apache documentation</a> for information on what these flags mean.}}
27
28 extern val redirect : mod_rewrite_flag;
29 extern val forbidden : mod_rewrite_flag;
30 extern val gone : mod_rewrite_flag;
31 extern val last : mod_rewrite_flag;
32 extern val chain : mod_rewrite_flag;
33 extern val nosubreq : mod_rewrite_flag;
34 extern val nocase : mod_rewrite_flag;
35 extern val qsappend : mod_rewrite_flag;
36 extern val noescape : mod_rewrite_flag;
37 extern val passthrough : mod_rewrite_flag;
38
39 extern val mimeType : rewrite_arg -> mod_rewrite_flag;
40 extern val redirectWith : redirect_code -> mod_rewrite_flag;
41 extern val skip : int -> mod_rewrite_flag;
42 extern val env : rewrite_arg -> rewrite_arg -> mod_rewrite_flag;
43
44 extern type mod_rewrite_cond_flag;
45 {{See <a href="http://httpd.apache.org/docs/2.2/mod/mod_rewrite.html#rewritecond">the
46 Apache documentation</a> for information on what these flags mean.}}
47
48 extern val cond_nocase : mod_rewrite_cond_flag;
49 extern val ornext : mod_rewrite_cond_flag;
50
51 extern val rewriteRule : regexp -> no_spaces -> [mod_rewrite_flag] -> [^Vhost];
52 {{See <a href="http://httpd.apache.org/docs/2.2/mod/mod_rewrite.html#rewriterule">Apache
53 documentation for <tt>RewriteRule</tt></a>.}}
54
55 extern val rewriteCond : no_spaces -> regexp -> [mod_rewrite_cond_flag] -> [^Vhost];
56 {{See <a href="http://httpd.apache.org/docs/2.2/mod/mod_rewrite.html#rewritecond">Apache
57 documentation for <tt>RewriteCond</tt></a>.}}
58
59 extern val rewriteBase : no_spaces -> [Location];
60 {{See <a href="http://httpd.apache.org/docs/2.2/mod/mod_rewrite.html#rewritebase">Apache
61 documentation for <tt>RewriteBase</tt></a>.}}
62
63 extern type proxy_port;
64 {{A port number above 1024}}
65
66 extern val proxyRewrite : regexp -> no_spaces -> proxy_reverse_target -> [mod_rewrite_flag] -> [^Vhost];
67
68 {{Safe wrapper around mod_rewrite proxy flag. All requests matching
69 the regular expression in the first argument are proxied to the host
70 specified in the third argument, appending a new URI by substituting
71 variables in the second argument as per Apache
72 mod_rewrite. Additional rewrite flags may be specified.}}
73
74 extern type mod_rewrite_trace_level;
75 {{A mod_rewrite log level, between 0 and 8. 2 or 3 are useful for
76 debugging, higher will slow down apache considerably. 0 disables
77 rewrite logging.}}
78
79 extern val rewriteLogLevel : mod_rewrite_trace_level -> [Vhost];
80 {{See <a href="https://httpd.apache.org/docs/current/mod/mod_rewrite.html#logging">
81 documentation for <tt>mod_rewrite log levels</tt></a>.}}