Skip to content

Commit

Permalink
redirect empty /s route to /
Browse files Browse the repository at this point in the history
  • Loading branch information
rajdeep-ghosh committed Jun 7, 2024
1 parent 9201023 commit 6703f3f
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/middleware.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import { NextResponse, type NextRequest } from 'next/server';

export function middleware(req: NextRequest) {
return NextResponse.redirect(new URL('/', req.url));
}

export const config = {
matcher: '/s'
};

0 comments on commit 6703f3f

Please sign in to comment.