I’m very much a n00b when it comes to Discourse but also forums in general and I’d like to ask and understand if and how it is possible for a URL of a thread to contain it’s category.
I’m utilising a third party software which scraps a forum. I’m limited to its queries and so when it scrapes a thread (topic) it needs to infer what category it is part of, which it appears to do via the url.
If you’re the one explicitly providing the URLs to the scraper and defining how it’ll extract the category from them, you might be able to use what Tobias suggested as a hack – you could provide it with /t/category-name__topic-slug/topic-id, for example. Discourse will serve a 301 redirect response to the final URL, based solely on the topic-id.
If it gets the URLs during the scraping process, though, it feels like a lot of work for a change aimed only at fulfilling a limitation in the scraping strategy.
Not that I know of. Serving a /t/category-name/topic-slug/topic_id route in a plugin seems doable, but then having an option so all references to topics in Discourse prefer this alternative route seems (to me, personally) like too much work for little gain.