Skip to content

Commit 1fb2975

Browse files
authored
Redirect /blog to the new blog website (e2b-dev#572)
This PR updates the middleware to direct the `/blog` traffic to the new Webflow landing page
2 parents c47fdbd + ffb6cef commit 1fb2975

File tree

1 file changed

+4
-9
lines changed

1 file changed

+4
-9
lines changed

apps/web/src/middleware.ts

+4-9
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import { replaceUrls } from '@/utils/replaceUrls'
33
import {
44
landingPageHostname,
55
landingPageFramerHostname,
6-
blogFramerHostname,
76
} from '@/app/hostnames'
87

98
export async function middleware(req: NextRequest): Promise<NextResponse> {
@@ -42,19 +41,15 @@ export async function middleware(req: NextRequest): Promise<NextResponse> {
4241
url.hostname = landingPageHostname
4342
}
4443

44+
if (url.pathname.startsWith('/blog')) {
45+
url.hostname = landingPageHostname
46+
}
47+
4548
// TODO: Not on the new landing page hosting yet
4649
if (url.pathname.startsWith('/ai-agents')) {
4750
url.hostname = landingPageFramerHostname
4851
}
4952

50-
if (url.pathname === '/blog' || url.pathname === '/blog/') {
51-
url.pathname = '/'
52-
url.hostname = blogFramerHostname
53-
}
54-
if (url.pathname.startsWith('/blog')) {
55-
url.hostname = blogFramerHostname
56-
}
57-
5853
const res = await fetch(url.toString(), { ...req })
5954

6055
const htmlBody = await res.text()

0 commit comments

Comments
 (0)