404 page as a result of double-encoded slashes in the URL when using Apache
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
RewriteRule /(.*) http://localhost:8085/$1 [NE,P,L]
ProxyPassReverse / http://localhost:8085/