Hi
I'm using IIS 7.5 on Windows 7 RC. I use the IIS Url Rewrite module to rewrite URLs.
Everything seems to work fine, until I perform a postback by clicking a button. It then appends the querystring params to my rewritten URL, like this:
Rewritten URL, as it appears in the browser: http://localhost/en/product/1239/Gary+Fisher+Hkek+Mountain+Bike
Without URL rewriting the URL is:
http://localhost/product.aspx?lang=en&id=1239&title=Gary+Fisher+Hkek+Mountain+Bike
When I click a button to perform a postback, the URL changes to this:
And when the URL is rewritten, all querystring params are doubled - so when I want to get the current language by doing this:
Request.QueryString["lang"]
The value I get back is "en,en".
Is anyone else having those problems?
UPDATE: Rewrite rules from Web.Config
<rule name="RedirectProductPageUrls" stopProcessing="true">
<match url="^product\.aspx$" />
<conditions logicalGrouping="MatchAll">
<add input="{REQUEST_METHOD}" negate="true" pattern="^POST$" />
<add input="{QUERY_STRING}" pattern="^lang=([^=&]+)&id=([^=&]+)&title=([^=&]+)$" />
</conditions>
<action type="Redirect" url="{C:1}/products/{C:2}/{C:3}" appendQueryString="false" redirectType="Permanent" />
</rule>
<rule name="RewriteProductPageUrls" stopProcessing="true">
<match url="^([^/]+)/product/([^/]+)/([^/]+)/?$" />
<conditions logicalGrouping="MatchAll">
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
</conditions>
<action type="Rewrite" url="product.aspx?lang={R:1}&id={R:2}&title={R:3}" />
</rule>