Hello. I have a URL that functions fine with no rewrite rules.
http://www.mysite.com/manufacturer.aspx?mfg=h
The aspx page filters a SQLDataSource result set by the querystring ID. If I turn on just the following 2 (extensionless page) rules (see below), my URL looks like this:
http://www.mysite.com/manufacturer?mfg=h
...However, the aspx page then behaves as if there is no querystring parameter of mfg. In my code-beside, the following expression is true, but should be false:
String
.IsNullOrEmpty(Request.QueryString("mfg"))
My 2 rules -------------
<rule name="RedirectToExtensionlessURLs" enabled="true">
<
match url="(.*).aspx" /><conditions>
<
add input="{REQUEST_FILENAME}" matchType="IsFile" /></conditions>
<
action type="Redirect" url="{R:1}" appendQueryString="true" redirectType="Permanent" /></rule>
<
rule name="ExtensionlessURLs" enabled="true"><match url="(.*)" />
<
conditions><add input="{REQUEST_FILENAME}" negate="true" pattern="(.*).aspx" />
<
add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" /><add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
</
conditions><action type="Rewrite" url="{R:1}.aspx" appendQueryString="false" />
</
rule>
---------
Cordially,
Lee