diff --git a/src/pages/channel/+page.js b/src/pages/channel/+page.js new file mode 100644 index 000000000..2926f05af --- /dev/null +++ b/src/pages/channel/+page.js @@ -0,0 +1,9 @@ +import { redirect } from '@sveltejs/kit' + +export function load({ url }) { + const id = url.searchParams.get('id') + const [name, country] = id.split('.') + const redirectUrl = `/channels/${country}/${name}` + + throw redirect(302, redirectUrl) +}