#New NextJS project default redirects to a page that does not exist, but exists elsewhere.

5 messages · Page 1 of 1 (latest)

wind parcel
#

Evening,

I have been having to make updates to a NextJs project, involving changing the redirects when the page loads etc. Have been having issues with this. Any default redirects placed in the next.config.mjs file does not work.

The project currently redirects to /sign-in when the site is loaded. Having to change this to rather redirect to / and display a landing page. Implements everything to do this, but the redirecting does not work; still goes to /sign-in.

I have done some googling and done most of most of fixes people have suggested, like clearing cache, remove node modules, moving project to new location.

After this all, I decided to create a new NextJS project from scratch to try some changes. When I run this fresh project with npm run dev, this new project starts redirecting to /sign-in. These files do not exist in the app folder. This project is also located in a completely different directory.

Restarting my PC also does not seem to fix this (just in case it was an issue).

I am currently stomped. I have no idea why this is occurring. Any ideas?

burnt bluffBOT
#

🔎 This post has been indexed in our web forum and will be seen by search engines so other users can find it outside Discord

🕵️ Your user profile is private by default and won't be visible to users outside Discord, if you want to be visible in the web forum you can add the "Public Profile" role in id:customize

✅ You can mark a message as the answer for your post with Right click -> Apps -> Mark Solution
(if you don't see the option, try refreshing Discord with Ctrl + R)

wind parcel
#

Please tag me.

nova carbon
#

@wind parcel It seems like you have some redirection code somewhere else

wind parcel