From af42bbde310aa816bc88a1649aed720904d50461 Mon Sep 17 00:00:00 2001 From: iyiolacak Date: Fri, 29 Aug 2025 04:00:27 +0300 Subject: [PATCH 1/3] =?UTF-8?q?docs:=20add=20/guides/.../welcome=20route?= =?UTF-8?q?=20redirect=20=E2=86=92=20/quick-start?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../getting-started-with-solid/welcome.tsx | 37 +++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 src/routes/guides/tutorials/getting-started-with-solid/welcome.tsx diff --git a/src/routes/guides/tutorials/getting-started-with-solid/welcome.tsx b/src/routes/guides/tutorials/getting-started-with-solid/welcome.tsx new file mode 100644 index 000000000..ee8df0938 --- /dev/null +++ b/src/routes/guides/tutorials/getting-started-with-solid/welcome.tsx @@ -0,0 +1,37 @@ +import { onMount } from "solid-js"; + +/** + * Server redirect. Immediate HTTP redirect for requests handled on the server. + * 301 for permanent. 301s may be cached by browsers/CDNs. + */ +export function GET() { + return new Response(null, { + status: 302, + headers: { Location: "/quick-start" }, + }); +} +/** + * Client fallback: for environments where GET isn't invoked the client will + * execute this and replace the location. Keeps UX smooth when navigating client-side. + */ +export default function WelcomeRedirect() { + onMount(() => { + // use replace so the redirect doesn't add an extra history entry + try { + window.location.replace("https://docs.solidjs.com/quick-start"); + } catch (e) { + // fallback: set href + window.location.href = "https://docs.solidjs.com/quick-start"; + } + }); + + return ( +
+

Redirecting…

+

+ You are being redirected to the Quick Start page. If the redirect does not happen automatically,{" "} + click here to continue. +

+
+ ); +} From 8e0a8dd62debdff4c76d97ab8b6b0da5c926fed3 Mon Sep 17 00:00:00 2001 From: iyiolacak Date: Fri, 29 Aug 2025 04:14:23 +0300 Subject: [PATCH 2/3] fix: remove unused error variable in redirect fallback --- .../guides/tutorials/getting-started-with-solid/welcome.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/routes/guides/tutorials/getting-started-with-solid/welcome.tsx b/src/routes/guides/tutorials/getting-started-with-solid/welcome.tsx index ee8df0938..483e4b23a 100644 --- a/src/routes/guides/tutorials/getting-started-with-solid/welcome.tsx +++ b/src/routes/guides/tutorials/getting-started-with-solid/welcome.tsx @@ -19,7 +19,7 @@ export default function WelcomeRedirect() { // use replace so the redirect doesn't add an extra history entry try { window.location.replace("https://docs.solidjs.com/quick-start"); - } catch (e) { + } catch { // fallback: set href window.location.href = "https://docs.solidjs.com/quick-start"; } From 3842fd95e8903caabef0fa1297b324f5f4071e11 Mon Sep 17 00:00:00 2001 From: iyiolacak Date: Wed, 17 Sep 2025 21:08:52 +0300 Subject: [PATCH 3/3] =?UTF-8?q?redirect(legacy):=20/guides/.../welcome=20?= =?UTF-8?q?=E2=86=92=20/quick-start?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/middleware/legacy-routes-redirect.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/middleware/legacy-routes-redirect.ts b/src/middleware/legacy-routes-redirect.ts index fdf371f9b..263fc5bd2 100644 --- a/src/middleware/legacy-routes-redirect.ts +++ b/src/middleware/legacy-routes-redirect.ts @@ -180,6 +180,8 @@ const LEGACY_ROUTES = { "/solid-router/reference/response-helpers/revalidate": "/solid-router/reference/data-apis/revalidate", + + "/guides/tutorials/getting-started-with-solid/welcome": "/quick-start", } as const; function isLegacyRoute(path: string): path is keyof typeof LEGACY_ROUTES {