diff --git a/src/middleware.js b/src/middleware.js index 4a0c2880d5e..e4ffeee0f72 100644 --- a/src/middleware.js +++ b/src/middleware.js @@ -9,15 +9,15 @@ export const config = { export async function middleware(req) { const path = req.nextUrl.pathname; + if (path !== "/") { + return NextResponse.redirect(new URL(path, "https://github.com")); + } + if (path === "/") { return NextResponse.redirect( new URL("/EddieHubCommunity/BioDrop", "https://github.com") ); } - if (path !== "/") { - return NextResponse.redirect(new URL(path, "https://github.com")); - } - return NextResponse.next(); }