From 26a51f55faccc30010ec66c455faf3a2c2e17e5a Mon Sep 17 00:00:00 2001 From: pollutri Date: Fri, 29 May 2026 17:12:50 +0200 Subject: [PATCH] Gestine pagina mancante o non autorizzata --- app/[...not_found]/page.tsx | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 app/[...not_found]/page.tsx diff --git a/app/[...not_found]/page.tsx b/app/[...not_found]/page.tsx new file mode 100644 index 0000000..d4f1d89 --- /dev/null +++ b/app/[...not_found]/page.tsx @@ -0,0 +1,9 @@ +import { redirect } from 'next/navigation'; + +export const dynamic = 'force-dynamic'; + +// Qualsiasi pagina inesistente → redirect alla home (niente schermata d'errore). +// Le rotte reali (/, /admin, /api/*) hanno priorità: solo i path non definiti arrivano qui. +export default function CatchAll() { + redirect('/'); +}