Skip to content

Commit 7c06099

Browse files
Fixing bad /apps redirect, adding catch-all redirect
1 parent 8216543 commit 7c06099

File tree

2 files changed

+20
-5
lines changed

2 files changed

+20
-5
lines changed

docs-v2/next.config.mjs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -69,11 +69,6 @@ export default withNextra({
6969
destination: "https://pipedream.com/apps/",
7070
permanent: true,
7171
},
72-
{
73-
source: "/apps/:path*/",
74-
destination: "https://pipedream.com/apps/:path*/",
75-
permanent: true,
76-
},
7772
{
7873
source: "/support/",
7974
destination: "https://pipedream.com/support/",

docs-v2/pages/404.tsx

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
import { useEffect } from 'react'
2+
import { useRouter } from 'next/router'
3+
4+
export default function Custom404() {
5+
const router = useRouter()
6+
7+
useEffect(() => {
8+
// 302 redirect (temporary) to home page
9+
router.replace('/')
10+
}, [router])
11+
12+
return (
13+
<div style={{ display: 'flex', justifyContent: 'center', alignItems: 'center', height: '100vh' }}>
14+
<div>
15+
<h1>Page not found</h1>
16+
<p>Redirecting to home page...</p>
17+
</div>
18+
</div>
19+
)
20+
}

0 commit comments

Comments
 (0)