Url Rewrite and Mod Rewrite Maps
See original GitHub issueBoth RewriteMap
in mod_rewrite and rewriteMap
in UrlRewrite are not supported in our rewrite module. From the initial scraping of examples, both of these features were rarely used, but it would be a nice addition.
From apache:
The RewriteMap directive defines an external function which can be called in the context of RewriteRule or RewriteCond directives to perform rewriting that is too complicated, or too specialized to be performed just by regular expressions. The source of this lookup can be any of the types listed in the sections below, and enumerated in the RewriteMap reference documentation.
Ex:
RewriteMap MapName MapType:MapSource
From IIS:
A rewrite map is an arbitrary collection of name-value pairs that can be used within rewrite rules to generate the substitution URL during rewriting. Rewrite maps are particularly useful when you have a large set of rewrite rules and all of these rules use static strings (that is, when there is no pattern matching used). In those cases, instead of defining a large set of simple rewrite rules, you can put all the mappings into the rewrite map as keys and values between the input URL and the substitution URL. Then, to look up the substitution URL based on the input URL, you will have one rewrite rule that references the rewrite map.
Ex:
<rewriteMap name="MyRewriteMap" defaultValue="">
<add key="a.html" value="b.html" />
</rewriteMap>
Issue Analytics
- State:
- Created 7 years ago
- Comments:15 (11 by maintainers)
Okay, going to close this then 😄
I’m very interested in this feature as well.