IIS7 Rewrite Map Regex?

iis-7, regex, rewritemap, url-rewriting

Solution

Unfortunately not, you'll need to create a rule to use regular expressions.

Notice that there is no obvious common pattern in the keys and their relation to values. This means that it is not possible to use regular expressions or wildcards to define URL transformation logic. http://www.iis.net/learn/extensions/url-rewrite-module/using-rewrite-maps-in-url-rewrite-module

Problem

Is it possible to use reg ex in a rewrite map? For example: ``` <rewriteMap name="Redirects"> <add key="/blah/(.*)" value="/blah/{R:1}" /> </rewriteMap> ``` Or is there a way to handle this approach? Currently, I have a rule set up to match on everything and then use the rewrite map to map to new urls. I would like to capture everything under a directory e.g. resource files (blah)... without having to manually to do this for them all.

Original source