Further to my question at How do write a rewrite rule in IIS that allows HTML anchors? I was wondering if I can do the following or alternatively if there is a similar option to what is available in Apache e.g. mod_rewrite with anchor link
<match url="^ts\/tcs\.aspx$" />
<action type="Redirect" url="http://www.abc.com" />
<conditions>
<add input="{UrlEncode:{URL}}" pattern="#" />
</conditions>
Here we go:
Everything after the hash (including the hash symbol itself) will NOT be sent to a server (it is client-side ONLY), therefore you cannot match it in any way.
It is not IIS restriction — any web server does (better say, should do) the same — the browser itself should not send it to a server in first place. Of course — if you send such request manually via custom code (PHP, ASP.NET etc) and corresponding function/class/component does not strictly follow standards, then it may get sent and then you will have it as part of query string (but the web server may reject such request, although unlikely).
If URL is:
/something.php?task=show#kitten, then#kittenis the hash (including the actual hash symbol#). The proper name ofkittenhere is Fragment Identifier.