mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-21 21:25:11 +00:00
docs: fix other issues with routeRules
example
This commit is contained in:
parent
b9cb08cdac
commit
818dc626cf
@ -67,8 +67,8 @@ Nitro has a powerful feature called `routeRules` which allows you to define a se
|
||||
export default defineNuxtConfig({
|
||||
routeRules: {
|
||||
'/': { prerender: true }, // Generated at build time for SEO purpose
|
||||
'/api/*': { cache: { maxAge: 60 * 60 } } // Cached for 1 hour
|
||||
'/old-page': { redirect: { to: '/new-page', status: 302 } } // Redirection to avoid 404
|
||||
'/api/*': { cache: { maxAge: 60 * 60 } }, // Cached for 1 hour
|
||||
'/old-page': { redirect: { to: '/new-page', statusCode: 302 } } // Redirection to avoid 404
|
||||
// ...
|
||||
}
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user