A bug report was filed regarding login redirects to the root path when serving Discourse from a subfolder. truman reported that logging in from the homepage on version 3.5.1 redirects users to https://www.example.com instead of the forum subfolder, although logging in from other pages works correctly. The logs indicate a redirect to the root path despite the redirect parameter pointing to the subfolder login page. pmusaraj acknowledged the report. Other users confirmed the issue persists in later versions, including Thiago_Mobilon on 3.6.0.beta3 and Magnetidog on 2025.12.0-latest. zogstrip apologized for the inconvenience and announced a fix in pull request 36609.
Logging in from a non-homepage does not have this issue.
log
Processing by StaticController#enter as HTML Parameters: {"username"=>"****", "password"=>"[FILTERED]", "redirect"=>"https://www.example.com/forum/login"} Redirected to https://www.example.com/