I have the following IIS site:
Calling www.site.com/Login redirects correctly to the page in my subapplication, the browser bar shows www.site.com/Login.
But, calling www.site.com, redirects to www.site.com/subapplication/Login, it also works, but I want www.site.com to show www.site.com/Login in the browser bar.
www.site.com is a .NET Core site with YARP
www.site.com/subapplication/Login is a .NET Framework site
"ReverseProxy": {
"Routes": {
"fallbackRoute": {
"ClusterId": "fallbackCluster",
"Order": "1",
"Match": {
"Path": "{**catch-all}"
},
"Transforms": [
{ "PathRemovePrefix": "/web" }
{ "RequestHeaderOriginalHost": "true" }
]
}
},
"Clusters": {
"fallbackCluster": {
"Destinations": {
"fallbackApp": {
"Address": "https://dansaleswebdev.danone.com.br/dev/web/"
}
}
}
}
}
www.site.com redirect to www.site.com/Login instead of www.site.com/subapplication/Login
I already tried to add the PathRemovePrefix transformation to remove /subapplication but it not worked.
Answered by Tratcher on GitHub.
See #1548.
You either need to change the framework app to generate the public urls, or you need to re-write the location header on the response.