Hi, we have a forum installed in subfolder, https://www.cuba-platform.com/discuss . The main website has a store located at https://www.cuba-platform.com/store . I would like to share this link in some topic or post of our forum. But Discourse handles this URL as internal, it adds /discuss to the URL: https://www.cuba-platform.com/discuss/store when I click the link in composed message.
The workaround I found - to use a link without www. But I would like to have a permanent solution, because users may publish any external links pointed to our website/old forum and those links will be always dead, and users do not know about the workaround.
Your solution is a pretty good one. Your only other option, I believe, is a custom plugin that adds a route for that address and redirects to the external (to Discourse) server.
Of course! I thought that I’d remembered that permalinks didn’t work this way, but maybe it was that permalink normalizations work only for permalinks.
Thank you, guys, but I assume this is a bug. The forum installed in a subfolder should not change any urls typed manually. I hope this information will help to detect a problem and fix it.
Here it is an example:
You may see, that the link points to the path out of the forum, let’s say ‘external url’ (for mind, my forum is located at https://www.cuba-platform.com/discuss).
The poster expects that anybody can follow the link later, as he(she) see on the screen - https://www.cuba-platform.com/store.
But actually forum redirects to another address https://www.cuba-platform.com/discuss/store which does not exist. This is because the forum has been installed in subfolder /discuss. I am sure that forum settings are correct . For that reason nobody knows how many cases with external links exist, and how many permanent rules should be predefined in the forum settings. The same problem is to have a plugin/php-script to handle such links.
As I remember, almost all external links posted by users were redirected to inexistent forum addresses, though those links were not located in forum. Users even cannot share a link to download page https://www.cuba-platform.com/download
I already have reported the same subfolder issues. Let me post it again, because here is a right place for them, I think. I filled some settings fields with custom values (terms of use, privacy policy etc) and tried to access them:
Go to https://www.cuba-platform.com/discuss/guidelines
Left click https://www.cuba-platform.com/terms-of-use - redirects to wrong location.
Go back to guidelines.
Left click https://www.cuba-platform.com/privacy-policy - redirects to wrong location.
Return to guidelines.
Left click https://www.cuba-platform.com/faq - redirects to correct location.
Open browser console and click Back button (go back). It will show unstoppable redirect.
We have forum installed in subfolder: https://i.materialise.com/forum/
It seems I have similar problem with external links. When user clicks on external link, he gets redirect to our domain with path and query string from original url.
For example: https://i.materialise.com/watch?v=<video_id>
instead of https://youtube.com/watch?v=<video_id>
Open in new tab menu and middle button click works well.
I am sorry, that was my fault. I used www in permalinks earlier. It works without www now. Probably the problem with www is on my side, I will investigate it later. Thanks!
this is still a bug, yesterday checked on v2.0.0.beta10 +117. No chance to fix it by permalinks. It is really painful, because for each posted link I need to create a permalink.
For example, i can create a permalink for https://www.cuba-platform.com/development, but I have to do the same for: https://www.cuba-platform.com/development/bla https://www.cuba-platform.com/development/bla-bla https://www.cuba-platform.com/development/bla-bla-bla
Moreover, first time the link is always broken until someone reports that it is broken . I even tried to use Saved searches to catch possible broken URLs, this made me a happy zombie-watcher .
Ok, let it be a solution in this quest . In my case I am not sure that we can move to subdomain, because we are strong )). Anyway this point may be useful for others who will surf this forum researching subfolder installation tips and tricks!
Thank you for your attention to all questions, very appreciated, @codinghorror!
The problem is we have virtually no customers running this way and we always recommend against it. Furthermore the way you have
example.com/content
Next to
example.com/forum
is even more odd … which means this is super rare in the wild. It also does not make sense for us to prioritize any fixes here because none of our customers benefit.
Ok, no problem. I realize that we chose our own problem with a subfolder installation, but now it is not reasonable to change it at all. I just used to think that it is possible to resolve this in some regexp in forum code.