Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add "Redirecting" page in the Routing section #60435

Merged
merged 23 commits into from
Jan 12, 2024
Merged

Conversation

delbaoliveira
Copy link
Contributor

@delbaoliveira delbaoliveira commented Jan 9, 2024

New page outlining all options for handling redirects in Next.js, from the simplest use cases (e.g. redirect() in a Server Action), to more advanced cases (e.g. bloom filters and middleware).

  • redirect
  • permanentRedirect
  • useRouter
  • next.config.js
  • Middleware
  • Handling redirects at scale
    • Edge config
    • Bloom filter

Bloom Filter Example: vercel/examples#857

Sorry, something went wrong.

Copy link
Contributor

github-actions bot commented Jan 9, 2024

All broken links are now fixed, thank you!

@delbaoliveira delbaoliveira changed the title WIP: Add Redirecting Page WIP: Add "Redirecting" Page Jan 10, 2024
@delbaoliveira delbaoliveira changed the title WIP: Add "Redirecting" Page WIP: Add "Redirecting" page in the Routing section Jan 10, 2024
@delbaoliveira delbaoliveira marked this pull request as ready for review January 11, 2024 14:26
@delbaoliveira delbaoliveira requested review from a team as code owners January 11, 2024 14:26
@delbaoliveira delbaoliveira changed the title WIP: Add "Redirecting" page in the Routing section Add "Redirecting" page in the Routing section Jan 11, 2024
delbaoliveira and others added 2 commits January 12, 2024 10:15
Co-authored-by: Lee Robinson <me@leerob.io>
@leerob leerob merged commit 4640ed0 into canary Jan 12, 2024
@leerob leerob deleted the docs-redirects-ojf7 branch January 12, 2024 14:50

## `permanentRedirect` function

The `permanentRedirect` function allows you to **permanently** redirect the user to another URL. You can call `redirect` in [Server Components](/docs/app/building-your-application/rendering/server-components), [Route Handlers](/docs/app/building-your-application/routing/route-handlers), and [Server Actions](/docs/app/building-your-application/data-fetching/server-actions-and-mutations).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The `permanentRedirect` function allows you to **permanently** redirect the user to another URL. You can call `redirect` in [Server Components](/docs/app/building-your-application/rendering/server-components), [Route Handlers](/docs/app/building-your-application/routing/route-handlers), and [Server Actions](/docs/app/building-your-application/data-fetching/server-actions-and-mutations).
The `permanentRedirect` function allows you to **permanently** redirect the user to another URL. You can call `permanentRedirect` in [Server Components](/docs/app/building-your-application/rendering/server-components), [Route Handlers](/docs/app/building-your-application/routing/route-handlers), and [Server Actions](/docs/app/building-your-application/data-fetching/server-actions-and-mutations).

opened #60583

leerob pushed a commit that referenced this pull request Jan 12, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 27, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants