Skip to content

Commit d0f94ca

Browse files
fix: additional 404 redirects (#2818)
<!-- Please make sure there is an issue that this PR is correlated to. --> ## Changes <!-- If there are frontend changes, please include screenshots. -->
1 parent 3ada1b2 commit d0f94ca

5 files changed

Lines changed: 69 additions & 67 deletions

File tree

site/next.config.ts

Lines changed: 5 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -24,17 +24,8 @@ const nextConfig = {
2424
},
2525
async redirects() {
2626
return [
27-
// Discord redirect
28-
{
29-
source: '/discord',
30-
destination: 'https://discord.gg/aXYfyNxYVn',
31-
permanent: false,
32-
},
33-
{
34-
source: '/discord/',
35-
destination: 'https://discord.gg/aXYfyNxYVn',
36-
permanent: false,
37-
},
27+
// NOTE: Redirects don't work with output: "export"
28+
// Static HTML redirect files are created in public/ instead
3829

3930
// Convenience Redirects
4031
{
@@ -43,67 +34,14 @@ const nextConfig = {
4334
permanent: false,
4435
},
4536

46-
// Redirects for moved Cloud docs
37+
// Redirects for moved Cloud docs
4738
{
4839
source: '/docs/actors-low-level',
4940
destination: '/docs/cloud/actors',
5041
permanent: false,
5142
},
52-
{
53-
source: '/docs/api',
54-
destination: '/docs/cloud/api',
55-
permanent: false,
56-
},
57-
{
58-
source: '/docs/api/:slug*',
59-
destination: '/docs/cloud/api/:slug*',
60-
permanent: false,
61-
},
62-
{
63-
source: '/docs/cli',
64-
destination: '/docs/cloud/cli',
65-
permanent: false,
66-
},
67-
{
68-
source: '/docs/config',
69-
destination: '/docs/cloud/config',
70-
permanent: false,
71-
},
72-
{
73-
source: '/docs/containers',
74-
destination: '/docs/cloud/containers',
75-
permanent: false,
76-
},
77-
{
78-
source: '/docs/continuous-delivery',
79-
destination: '/docs/cloud/continuous-delivery',
80-
permanent: false,
81-
},
82-
{
83-
source: '/docs/durability',
84-
destination: '/docs/cloud/durability',
85-
permanent: false,
86-
},
87-
{
88-
source: '/docs/edge',
89-
destination: '/docs/cloud/edge',
90-
permanent: false,
91-
},
92-
{
93-
source: '/docs/environment-variables',
94-
destination: '/docs/cloud/environment-variables',
95-
permanent: false,
96-
},
97-
{
98-
source: '/docs/faq',
99-
destination: '/docs/cloud/faq',
100-
permanent: false,
101-
},
102-
{
103-
source: '/docs/functions',
104-
destination: '/docs/cloud/functions',
105-
permanent: false,
106-
},
43+
// These redirects work in dev but not in static export
44+
// Static HTML files created in public/ instead
10745
{
10846
source: '/docs/hub',
10947
destination: '/docs/cloud/hub',
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8">
5+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
6+
<title>Redirecting to Actor Communication Documentation...</title>
7+
<meta http-equiv="refresh" content="0; url=/docs/actors/communicating-between-actors/">
8+
<link rel="canonical" href="/docs/actors/communicating-between-actors/">
9+
<script>
10+
window.location.replace("/docs/actors/communicating-between-actors/");
11+
</script>
12+
</head>
13+
<body>
14+
<p>This documentation has been renamed and moved. If you are not redirected automatically, <a href="/docs/actors/communicating-between-actors/">click here to view the Actor Communication documentation</a>.</p>
15+
</body>
16+
</html>
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8">
5+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
6+
<title>Redirecting to JavaScript Client...</title>
7+
<meta http-equiv="refresh" content="0; url=/docs/clients/javascript/">
8+
<link rel="canonical" href="/docs/clients/javascript/">
9+
<script>
10+
window.location.replace("/docs/clients/javascript/");
11+
</script>
12+
</head>
13+
<body>
14+
<p>If you are not redirected automatically, <a href="/docs/clients/javascript/">click here to view the JavaScript Client documentation</a>.</p>
15+
</body>
16+
</html>

site/public/discord/index.html

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8">
5+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
6+
<title>Redirecting to Discord...</title>
7+
<meta http-equiv="refresh" content="0; url=https://discord.gg/aXYfyNxYVn">
8+
<link rel="canonical" href="https://discord.gg/aXYfyNxYVn">
9+
<script>
10+
window.location.replace("https://discord.gg/aXYfyNxYVn");
11+
</script>
12+
</head>
13+
<body>
14+
<p>If you are not redirected automatically, <a href="https://discord.gg/aXYfyNxYVn">click here to join our Discord</a>.</p>
15+
</body>
16+
</html>
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8">
5+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
6+
<title>Redirecting to Talk to an Engineer...</title>
7+
<meta http-equiv="refresh" content="0; url=/talk-to-an-engineer/">
8+
<link rel="canonical" href="/talk-to-an-engineer/">
9+
<script>
10+
window.location.replace("/talk-to-an-engineer/");
11+
</script>
12+
</head>
13+
<body>
14+
<p>If you are not redirected automatically, <a href="/talk-to-an-engineer/">click here to talk to an engineer</a>.</p>
15+
</body>
16+
</html>

0 commit comments

Comments
 (0)