404 page as a result of double-encoded slashes in the URL when using Apache

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

Symptoms

You have placed an Apache server in front of Bamboo or other applications for redirection. Trying to access your application with a URL such as http://myhost.domain/bamboo you got redirected to https://myhost.mydomain/bamboo/userlogin!default.action?os_destination=%252Fstart.action :

Result:

  • Page not Found

  • The requested URL /bamboo//start.action was not found on this server.

Cause

The Character %252F is double encoded / and %2F is single encoded /. So that means that the last segment of the URL os_destination=%252Fstart.action has an additional slash which does not exist. There is a bug report regarding the additional slash that is being tracked with Apache at https://issues.apache.org/bugzilla/show_bug.cgi?id=39746

Resolution

Add [NE] flag to one of the global rewrite rules that redirect everything that goes to your Bamboo server. Your httpd config file should have something like

1 2 RewriteRule /(.*) http://localhost:8085/$1 [NE,P,L] ProxyPassReverse / http://localhost:8085/
Updated on April 7, 2025

Still need help?

The Atlassian Community is here for you.