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

Resolved 404 "Page Not Found" Routing Error #189

Closed
wants to merge 1 commit into from

Conversation

MastanSayyad
Copy link
Contributor

Pull Request for WebMasterLog 💡

Issue Title: Bug 🐛: "Routing Navigation Errors" For The Pages after refreshing.

  • Name of the project : WebMasterLog
  • Category: React, Vanilla
  • Name: Mastan Sayyad
  • GitHub ID: MastanSayyad
  • Idenitfy yourself: GSSOC Contributor

Closes: #185

Describe the add-ons or changes you've made 📃

To rectify the {404 Not Found Error}, it is necessary to establish redirect and rewrite rules for the React Router application. These rules will assist the application in circumventing the "Page Not Found" error.

That's why I created a vercel.json file in the root directory of the project. This file will enable Vercel to configure the routing accurately.

  • vercel.json code snippet:

image

  • The provided code snippet instructs Vercel to rewrite any incoming URL path to the root path.
  • This configuration ensures that when we initiate a redirect with a child path, Vercel will redirect it to the root path, effectively preventing the occurrence of the 404 Not Found Error.

Type of change ☑️

What sort of change have you made:

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested? ⚙️

  • My code follows the Contributing Guidelines & Code of Conduct of this project.
  • This PR does not contain plagiarized content.
  • I have performed a self-review of my own code.
  • My changes generate no new warnings.

Note to reviewers 📄

@Avdhesh-Varshney Take a look at this and inform me if it does not work. so that I can look for an additional alternate solution, Thank you.

Copy link

vercel bot commented May 25, 2024

@MastanSayyad is attempting to deploy a commit to the avdheshvarshney's projects Team on Vercel.

A member of the Team first needs to authorize it.

Copy link

Thank you for submitting your pull request! We'll review it as soon as possible. For further communication, join our discord server https://discord.gg/tSqtvHUJzE.

Copy link
Owner

@Avdhesh-Varshney Avdhesh-Varshney left a comment

Choose a reason for hiding this comment

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

@MastanSayyad Not approved.
As you have committed directly in the main branch. So, create your own branch so that it will deploy on vercel and able to verify your changes.

  • Recreate you pr.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug 🐛: "Routing Navigation Errors" For The Pages after refreshing.
2 participants