Next.js Discord

Discord Forum

Next config redirect

Unanswered
Himalayan posted this in #help-forum
Open in Discord
HimalayanOP
Hi everyone, I'm having a little issue trying to configure a temporary redirect from a previous site to new URL path. I have the following:

{
  source: '/category-talk/:path*',
  destination: '/category-talk',
  permanent: false
}


The requirement is to '302 redirect all /category-talk/* URLs to the talk splash page'.

I have a page set up at pages/category-talk - However, when I hit /category-talk directly in the browser I get a redirect loop. Is there a way around this at all?

I need to achieve the following:

1. Redirect all /category-talk/* URL's to /category-talk
2. Have the ability to hit /category-talk directly

Does anyone have a suggestion/approach that I could try here? Thanks 🙂

0 Replies