-
Notifications
You must be signed in to change notification settings - Fork 39
/
mod_rewrite.4gx
38 lines (38 loc) · 1.4 KB
/
mod_rewrite.4gx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
.\" SPDX-License-Identifier: CC-BY-SA-4.0 or-later
.\" SPDX-FileCopyrightText: 2021 grommunio GmbH
.TH mod_rewrite 4gx "" "Gromox" "Gromox admin reference"
.SH Name
mod_rewrite \(em http(8gx) processing plugin for altering HTTP request URIs
before processing
.SH Description
mod_rewrite can alter request URIs. It runs before any of the other built-in or
HTTP processing modules.
.SH Configuration directives
This (built-in) plugin shares \fBhttp.cfg\fP. See http(8gx).
.SH Rewrite map
The filemap that specifies which URIs to handle is \fBrewrite.txt\fP,
which is searched for in \fIconfig_file_path\fP. The usual location is
/etc/gromox/rewrite.txt.
.PP
Each line in this file consists of 3 columns separated by whitespace:
.IP \(bu 4
A POSIX Basic Regular Expression (cf. regcomp(3)) for matching the original URI.
.IP \(bu 4
The fixed sequence "=>".
.IP \(bu 4
Replacement string. Captures can be spliced using \fB\\1\fP, \fB\\2\fP, .. up
to a maximum of \fB\\9\fP. The sequence \fB\\0\fP splices the entire string
(equivalent of Perl's \fB$&\fP).
.PP
If the file has no lines, no paths will be rewritten.
If the file is absent however, a set of default entries will be used.
.SH Default rules
.nf
\\(/Microsoft-Server-ActiveSync\\) => \\1/grommunio-sync/index.php
.fi
.SH Files
.IP \(bu 4
\fIconfig_file_path\fP/rewrite.txt: Rewrite map specifying which paths this
plugin shall handle.
.SH See also
\fBgromox\fP(7), \fBhttp\fP(8gx)