Problem Rewriting URL's from HTTPS to HTTP using IIS7 URL Rewriter, when using Webforms ReturnURL=
- by theminesgreg
I took Jeff's Re-write rules from this post and the HTTP to HTTPS conversion works great. However, going back to HTTP is giving me problems because of the ReturnUrl= in the URL (I'm using webforms).
Here's an example of the url: https://localhost/Login.aspx?ReturnUrl=%2f
Here's the rewrite rule I'm using:
<rule name="HTTPS to HTTP redirect for all other pages" stopProcessing="true">
<match url="^login\.aspx$" ignoreCase="true" negate="true" />
<conditions>
<add input="{SERVER_PORT}" pattern="^443$" />
</conditions>
<action type="Redirect" redirectType="Found" url="http://{HTTP_HOST}{REQUEST_URI}" />
</rule>
Here's the resulting re-written URL: http://localhost/,/
Has anyone found a work around for this?