Name
RewriteMap
Synopsis
RewriteMapname
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:
toupper
ortolower
-
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
Get Webmaster in a Nutshell, Third Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.