Add redirect for legacy calculator paths
This commit is contained in:
6
hdyc-svelte/src/routes/calculator/[slug]/+page.server.ts
Normal file
6
hdyc-svelte/src/routes/calculator/[slug]/+page.server.ts
Normal file
@@ -0,0 +1,6 @@
|
||||
import { redirect } from '@sveltejs/kit';
|
||||
import type { PageServerLoad } from './$types';
|
||||
|
||||
export const load: PageServerLoad = ({ params }) => {
|
||||
throw redirect(301, `/${params.slug}`);
|
||||
};
|
||||
Reference in New Issue
Block a user