Files
medusa-store/www/apps/book/middleware.ts
Shahed Nasser 9167352778 docs: fix redirect infrastructure modules (#12238)
* docs: fix redirect infrastructure modules

* change middleware
2025-04-18 14:19:55 +03:00

14 lines
417 B
TypeScript

import { NextResponse } from "next/server"
import type { NextRequest } from "next/server"
export function middleware(request: NextRequest) {
const path = request.nextUrl.pathname.replace("/index.html.md", "")
return NextResponse.rewrite(
new URL(`/md-content${path.replace("/index.html.md", "")}`, request.url)
)
}
export const config = {
matcher: "/((?!resources|api|ui|user-guide).*)index.html.md",
}