# Serve Discourse from a subfolder, Login redirects to root path

**URL:** https://meta.discourse.org/t/serve-discourse-from-a-subfolder-login-redirects-to-root-path/386619
**Category:** Bug
**Tags:** subfolder
**Created:** [October 24, 2025, 7:59am UTC](https://meta.discourse.org/t/serve-discourse-from-a-subfolder-login-redirects-to-root-path/386619 "2025-10-24T07:59:33Z")
**Posts on this page:** 1
**Showing post:** 1

<div class="post-metadata">

### Author: ![truman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/truman/32/491648_2.png) [@truman](https://meta.discourse.org/u/truman)
#### Post date: [October 24, 2025, 7:59am UTC](https://meta.discourse.org/t/serve-discourse-from-a-subfolder-login-redirects-to-root-path/386619/1 "2025-10-24T07:59:33Z")

</div>

version:v3.5.1  
my website: [https://www.example.com/forum](https://www.example.com/forum)  
local login(homepage) will redirect to [https://www.example.com](https://www.example.com)

Logging in from a non-homepage does not have this issue.

log

```plaintext
Processing by StaticController#enter as HTML Parameters: {"username"=>" ****", "password"=>"[FILTERED]", "redirect"=>"https://www.example.com/forum/login"} Redirected to https://www.example.com/

```

---

_[View the full topic](https://meta.discourse.org/t/serve-discourse-from-a-subfolder-login-redirects-to-root-path/386619)._
