Subfolder rewrites (but doesn't redirect) to main domain after 2.5.0.beta6

I have 2 containers (1 discourse and 1WordPress) and an Nginx reverse proxy routing traffic to

  • WordPress: any URLs without /community after mydomain . com
  • Discourse: when the URL is mydomain . com/community.

It has been working well for a year. After the update 2.5.0.beta6 I noticed that when I was going to mydomain . com /community it is being rewritten to mydomain . com but it’s not being redirected to mydomain . com so discourse works fine (except some 404 in the console).

If I go to a topic, I get the URL rewritten with /community in it.
If I go to the admin part, I don’t get the /community but I can still do any modification in the admin.

Of course, if I manually refresh the page when /community is not in the URL, I get redirected to the WordPress

If you want to see it in action: brigadedufric . com/community/ (remove spaces)

  1. How can I try to fix this?
  2. If it’s too complicated I might just move everything from subfolder to subdomain to avoid any problem in the future. Any recommendations about the way to go and things to not forget?
1 Like

I think this is a bug because I’m seeing the same thing on my subfolder setup after upgrading.

URLs work fine if you visit them directly, and the links in the markup are correct, but when JS takes over for navigating between pages it omits the subfolder path from the URL when it calls history.pushState().

So while the navigation works the URL presented to the user is wrong, which is a bit of a problem because if someone copies the link to share it it’s going to 404.


You’ve already suggested the permanent solution to your problem :wink:

Subfolder Install will continue to have quirks like this because it’s neither recommend nor massively adopted. Those who have reasons to use subfolder usually have to report these issues all the times to get them fixed.

So my best recommendation to you is to use a subdomain and call it a day.

1 Like

I disagree with that… Subfolders may be harder to set up but bugs are minimal in the last few years.


@dbrookes This was fixed for me after update 1c48853ede

I’m still going to assign some time this year to migrate from subfolder to subdomain. If anyone has any guidelines to share I’d appreciate it :smiley:

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.