-
I’m currently migrating my Next.js 12 web application to Next.js 14 while maintaining the same page router structure.
-
However, after the version update, I’ve encountered an issue with redirection.
-
Previously, in my application, refreshing (ANY PAGE ) EXAMPLE – the event listing page would keep the user on the same page.
-
Post-migration to Next.js 14, refreshing (ANY PAGE ) EXAMPLE – the event listing page redirects the user first to the landing page and then immediately to the home page.
Here’s the folder structure of my pages:
pages/
├─ admin/
│ └─ …
└─ client/
├─ home.js
├─ landing.js
└─ events/
└─ alleventlisting.js
REACT and REACT_DOM VERSION
“react”: “^18.2.0”,
“react-dom”: “^18.2.0”,
NEXT-JS VERSION
“next”: “^14.2.2”,
-
This issue is in all pages
-
This unexpected redirection disrupts the user experience and deviates from the intended functionality.
-
I’m seeking assistance to understand why this behavior occurs and how I can rectify it to ensure that refreshing the event listing page retains the user on the same page without any intermediary redirections.