diff --git a/middleware.js b/middleware.js index b31631463..2bc9f4e19 100644 --- a/middleware.js +++ b/middleware.js @@ -1,7 +1,7 @@ // Exports // ============================================================================= export const config = { - matcher: ['/(index.html)?'], + matcher: ['/preview/(index.html)?'], }; // Rewrite rules shared with local server configurations diff --git a/vercel.json b/vercel.json index 7f7435077..da3464f69 100644 --- a/vercel.json +++ b/vercel.json @@ -5,5 +5,9 @@ "headers": [{ "key": "x-robots-tag", "value": "noindex" }] } ], - "rewrites": [{ "source": "/:path*", "destination": "/docs/:path*" }] + "redirects": [{ "source": "/", "destination": "/preview/" }], + "rewrites": [ + { "source": "/preview/CHANGELOG.md", "destination": "/CHANGELOG.md" }, + { "source": "/preview/:path*", "destination": "/docs/:path*" } + ] }