Regex for URL rewrite with optional query string parameters
问题 I have this rewrite rule: <rule name="rentals by proptype+state+city+street test" stopProcessing="true"> <match url=".*" /> <conditions> <add input="{UNENCODED_URL}" pattern="^/([a-zA-Z0-9\-+]+)/rent/province/([a-zA-Z\-+]+)/street/([a-zA-Z0-9%\-+]+)/([0-9a-zA-Z%\-+']+)$" /> </conditions> <action type="Rewrite" url="search_new.aspx?proptype={C:1}&province={C:2}&city={C:3}&street={C:4}" appendQueryString="true" /> </rule> I also tried: <rule name="rentals by proptype+state+city+street test"