Skip to content

Bug 🐞 Routing Navigation Error "404 Page Not Found" After Refreshing Pages #420

@MastanSayyad

Description

@MastanSayyad

Describe your issue

Hey @PranavBarthwal

I was just checking the website and I found that The navigations to the pages only work for a short period of time. Once refresh the page it shows following error to the pages Except Home Page/Components

image

I have checked for the Pages routes such as MartianImagery, NASA's Projects, About us These URLs/Links only work for a short time, when you refresh the page, it shows a 404 page.

Steps to reproduce the bug

  1. Go to pages MartianImagery, NASA's Projects, About us or any page except the Home page/components
  2. Refresh the page
  3. You will get a 404 Page not found error

What was the expected result?

The pages should work without errors

Put here any screenshots or videos (optional)

MartianImagery

page1.mp4

NASA's Projects

page2.mp4

About us

page3.mp4

Would you like to work on this issue?

Yes

How will you fix this? (Only if you want to work on this issue)

#Solution 1:

  • First, we will try by minor changing the path/routes for the pages.

#Solution 2:

After deploying the changed path if the error occurs again then based on my knowledge it only happens if you don't configure your vercel.json The routes don't get recognized except the "/" Home page routes. we have to:

  • I'll create a vercel.json file to the project.
  • add rewrite and redirecting routing rules and configurations
  • On the vercel deployment dashboard ensure we pick vitejs as a framework
  • Error Solved !!

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions