Problem with permalinks

AI-generated summary

Problem with permalinks

The discussion revolves around an issue with permalinks on a Discourse site. Initially, cori reported that a permalink set up to redirect to a specific page was working from a fresh session but not when followed from within the site. Stephen explained that permalinks are intended for external URL redirection and are not designed to work within the site.

However, codinghorror mentioned that internal redirection might be possible, and tshenry provided an example of a permalink setup that redirects to a support category. cori clarified that this example is still an external redirect and not what they were hoping to achieve.

tshenry then provided another example, <https://meta.discourse.org/guide>, which seems to work as expected, even when followed from within the site. cori confirmed that this example meets their requirements.

I’m seeing some odd behavior with permalinks on our site. I have a permalink set up to https://support.glitch.com/office-hours which works from a fresh session (in an incognito window, for instance, or even just a new tab) By “works” I mean it returns a 301 redirect to the location configured in /admin/customize/permalinks as I’d expect

I have that link inside a different post on the forum, though, and when that link is followed I get this:

The correct page loads on refresh, but as you might imagine this looks pretty unprofessional to our members. Is there some reason I don’t know about that would prevent that from working?

Permalinks are intended to remap inbound links to your Discourse instance, and are useful when migrating from another platform. They catch inbound traffic and reroute those requests to the new destination, which is why they work when you hit refresh.

They’re not going to work within Discourse itself, please use the correct internal URL, rather than the permalink that you’ve created which redirects to it.

Yes, these are for external URL redirection, there is no concept of internal redirection.

I believe we have internal redirects possible here now yes @tshenry?

I think so. For example it looks like Meta has

https://meta.discourse.org/support

set up as a permalink to our support category.

It looks like we can permalink in the following ways at the moment:

Thanks for the replies, y’all - I’m not managing that Discourse instance any more and we no longer “need” this functionality, but it’d be nice to know it’s there.

@tshenry it seems to me that your example is what was discussed above as an “external” link, though, right? Taking a request from an external source and redirecting it to the proper Discourse URL - what we were hoping to do would be akin to redirecting Support - Discourse Meta to Issues · discourse/discourse · GitHub (if you all accepted issue reports there, of course), which worked (as I recall) for folks coming into the site from outside, but failed to redirect on the first page load when following a link from a Discourse page.

Thanks for the clarification! It does look like we have an example of what you describe in place:

https://meta.discourse.org/guide

Does that seem to be working the way you would expect?

Ha, I initially thought you meant there was an example on that page :wink: - once I realized you meant that was the example, then yes, that seems to do what we wanted. Thanks!!