Skip to content

Commit

Permalink
redirect to external url
Browse files Browse the repository at this point in the history
  • Loading branch information
steven-tey committed Mar 22, 2022
1 parent 327dfa1 commit 5d2479f
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions pages/_middleware.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@ export default function middleware(req: NextRequest) {

// Only for demo purposes – remove this if you want to use your root domain as the landing page
if (hostname === "vercel.pub" || hostname === "platforms.vercel.app") {
url.pathname = "https://demo.vercel.pub";
return NextResponse.redirect(url);
return NextResponse.redirect("https://demo.vercel.pub");
}

const currentHost =
Expand Down

0 comments on commit 5d2479f

Please sign in to comment.