IIS rewrite rule when committer name contains backslashes
Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.
Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Except Fisheye and Crucible
Using IIS while having committers names containing backslashes may cause issues when trying to add new changesets to a review if the rewrite rule in IIS is not properly configured.
The following rewrite rule should avoid such problems by the moment that URL containing URLencoded backslashes won't have the backslashes replaced by slashes:
1
2
3
4
5
6
7
<rule name="FishEye" stopProcessing="true">
<match url="(.*)" />
<action type="Rewrite" url="http://HOST:PORT/{UrlDecode:{C:1}}" logRewrittenUrl="true" />
<conditions>
<add input="{UNENCODED_URL}" pattern="/(.*?)($|\?)" />
</conditions>
</rule>
The rewrite rules are stored either in the ApplicationHost.config file or in Web.config files. This uses the UNENCODED_URL variable to get the original URL and use it to rewrite the request.
Was this helpful?