diff --git a/app/assets/javascripts/discourse/app/routes/app-route-map.js b/app/assets/javascripts/discourse/app/routes/app-route-map.js index 9306fa71dea..fd06c0b178b 100644 --- a/app/assets/javascripts/discourse/app/routes/app-route-map.js +++ b/app/assets/javascripts/discourse/app/routes/app-route-map.js @@ -248,6 +248,9 @@ export default function () { this.route("intersection", { path: "intersection/:tag_id/*additional_tags", }); + + // legacy route + this.route("legacyRedirect", { path: "/:tag_id" }); }); this.route( diff --git a/app/assets/javascripts/discourse/app/routes/tags-legacy-redirect.js b/app/assets/javascripts/discourse/app/routes/tags-legacy-redirect.js new file mode 100644 index 00000000000..94c8dbd4478 --- /dev/null +++ b/app/assets/javascripts/discourse/app/routes/tags-legacy-redirect.js @@ -0,0 +1,7 @@ +import Route from "@ember/routing/route"; + +export default Route.extend({ + beforeModel() { + this.transitionTo("tag.show", this.paramsFor("tags.legacyRedirect").tag_id); + }, +});