Name
RewriteMap
Synopsis
RewriteMap
name
type:source
[server config or
<VirtualHost>]
Declares the rewriting map and its type. The map file performs substitutions for various URIs. The name parameter makes up the given name of the mapping. The type and source variables are determined by the type:
-
txt A plain-text file, with the source pointing to a regular file
-
rnd A plain-text file with a random mapping choice; the source variable points to a regular file
-
dbm The source variable points to a DBM-formatted file
-
int An internal Apache function; the source variable can be one of two functions:
toupperortolower-
prg A program. The source variable points to a Unix executable
Here is an example that shows how to use a text-based rewriting file:
RewriteMap real-host txt:/usr/local/maps/mymap.txt
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access