I've got the following URL Rewrite Rules set up:
<rules>
<rule name="Clean URL" stopProcessing="true">
<match url="^([A-Za-z0-9]+)([\?A-Za-z0-9#=&]+)?$" />
<action type="Rewrite" url="{R:1}.aspx{R:2}" />
</rule>
<rule name="CleanTest" stopProcessing="true">
<match url="^([a-z0-9/]+).aspx([a-zA-Z0-9\?#=&]+)?$" />
<action type="Redirect" url="{R:1}{R:2}" />
</rule>
</rules>
What this does is show a clean (non-.aspx) URL in the client's address bar and additionally redirects every clean URL call to the corresponding .aspx-Page. This "generally" works fine. However, when my URL includes a hashtag, i.e. Administration.aspx#first
the hashtag is missing after the redirection in IE only, it works perfectly fine in FF/Chrome, what could cause this?
Result after clicking on the Link in Chrome/FF:
Administration#first
Result in IE (9):
Administration
Addendum: It works perfectly fine for GET-Parameters.
Link: Login.aspx?logout=1
IE: Login?logout=1
FF/Chrome: Login?logout=1
As the hashtag is mainly is for the browser on the client side to know where to scroll within a page, it seems logical to me that not all browsers send it to the server. However I am not sure what the specification says about it.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With