Skip to content

Commit

Permalink
Merge pull request #639 from 1ifeworld/0xTranqui/241106-redirect-2
Browse files Browse the repository at this point in the history
logs
  • Loading branch information
0xTranqui authored Nov 6, 2024
2 parents fccb624 + b066320 commit b198e03
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions apps/site/middleware.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,14 @@ import type { NextRequest } from 'next/server';
export function middleware(request: NextRequest) {
const url = new URL(request.url);

console.log("incoming url: ", url)

// Redirect users visiting river.ph to river.site
if (url.hostname === 'river.ph') {
url.hostname = 'river.site';
console.log("outgoing url: ", url)
return NextResponse.redirect(url);

}

// Allow the request to proceed for other domains
Expand Down

0 comments on commit b198e03

Please sign in to comment.