diff --git a/site/middleware.js b/site/middleware.js new file mode 100644 index 0000000..d0efa23 --- /dev/null +++ b/site/middleware.js @@ -0,0 +1,12 @@ +import { NextResponse } from "next/server"; + +export function middleware(request) { + + if (/[A-Z]/.test(request.nextUrl.pathName)) { + const url = request.nextUrl.clone(); + url.pathname = pathname.toLowerCase(); + return NextResponse.redirect(url); + } + + return NextResponse.next(); +} \ No newline at end of file