rsnext/examples/redirects
2022-10-30 21:00:45 +01:00
..
components Convert many examples to TypeScript (#41825) 2022-10-26 20:28:55 +00:00
pages Run next/link codemod for Next.js 13 on examples (#41913) 2022-10-30 21:00:45 +01:00
.gitignore Update default gitignore templates (#39051) 2022-07-26 20:08:40 -05:00
next.config.js Convert many examples to TypeScript (#41825) 2022-10-26 20:28:55 +00:00
package.json Convert many examples to TypeScript (#41825) 2022-10-26 20:28:55 +00:00
README.md Convert many examples to TypeScript (#41825) 2022-10-26 20:28:55 +00:00
styles.module.css Example for Redirects (Custom routes) (#15411) 2020-08-05 22:20:49 +00:00
tsconfig.json Convert many examples to TypeScript (#41825) 2022-10-26 20:28:55 +00:00

Redirects Example

This example shows how to use redirects in Next.js to redirect an incoming request path to a different destination path.

The index page (pages/index.tsx) has a list of links that match the redirects defined in next.config.js. Run or deploy the app to see how it works!

Deploy your own

Deploy the example using Vercel or preview live with StackBlitz

Deploy with Vercel

How to use

Execute create-next-app with npm, Yarn, or pnpm to bootstrap the example:

npx create-next-app --example redirects redirects-app
yarn create next-app --example redirects redirects-app
pnpm create next-app --example redirects redirects-app

Deploy it to the cloud with Vercel (Documentation).