redirect to index page when accessing a page which does not exist
All checks were successful
delpoy / build-and-deploy (push) Successful in 35s
All checks were successful
delpoy / build-and-deploy (push) Successful in 35s
This commit is contained in:
parent
677def02ca
commit
66e440ed10
6
src/routes/[...path]/+page.ts
Normal file
6
src/routes/[...path]/+page.ts
Normal file
@ -0,0 +1,6 @@
|
||||
import type { PageLoad } from './$types';
|
||||
import { redirect } from '@sveltejs/kit';
|
||||
|
||||
export const load: PageLoad = async () => {
|
||||
throw redirect(302, '/');
|
||||
};
|
Loading…
x
Reference in New Issue
Block a user