Yeah, is an old post, but... doesn't appear to really have an answer. Although @Adam-Mazzarella (https://stackoverflow.com/users/5169684/adam-mazzarella) did mention the answer in passing.
The key is that IIS URL Rewrite uses only the PATH portion of the input URL to match against. That is the part of the URL that comes after the slash of the host:port portion, and does not include the host:port portion.
MS documentation: https://learn.microsoft.com/en-us/iis/extensions/url-rewrite-module/url-rewrite-module-configuration-reference#accessing-url-parts-from-a-rewrite-rule
From that:
For an HTTP URL in this form: http(s)://<host>:<port>/<path>?<querystring>
- The <path> is matched against the pattern of the rule...
So, from your example, the input is: "http://dittest:8080/" (or "http://dittest" should result in the same match):
... this would match, and rewrite the URL.
If your input URL was "http://dittest:8080/some/thing" or "http://dittest/some/thing":
... this would not match because the Path is not null, and thus would not rewrite the URL.