Quantcast
Channel: URL Rewrite Module
Viewing all articles
Browse latest Browse all 2482

URL Rewrite: How to get the FileMapProvider to pass the query string

$
0
0

I'm in the middle of changing an existing application to use the FileMapProvider for routing the URLs. With this application, the pages on the site have the concept of drafts and published, and I have it so that all the published pages routing correctly, however, with the drafts, this is indicated by having a query string with a tempid parameter in the URL. My problem is that I can't seem to figure out how to either get FileMapProvider to match on the full URL or to match URL + the tempid part of the query string.

To be clear:

/sports/football will match to /sports/football

/sports/football?tempid=200 will not match to /sports/football?tempid=200

Here is my attempt at this rule:

<rule name="FileMapProvider" stopProcessing="true"><match url="(.*)(\?tempid=[0-9]*)" /><conditions><add input="{FileMapProvider:{R:1}{R:2}}" pattern="(.+)" /></conditions><action type="Rewrite" url="{C:1}" /></rule> 


Viewing all articles
Browse latest Browse all 2482

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>