QR-Code-Generator icon indicating copy to clipboard operation
QR-Code-Generator copied to clipboard

404 Not Found Error on Refresh for Single-Page Applications

Open Rahul-Sahani04 opened this issue 1 year ago • 1 comments

This issue reports a common problem encountered with SPAs deployed on Vercel. While navigation works smoothly using internal links from the homepage, refreshing subpages results in a 404 Not Found error.

Steps to Reproduce:

  1. Deploy a single-page application to Vercel.
  2. Navigate to the home page (https://qrbuilder.vercel.app).
  3. Use internal links to navigate to subpages (https://qrbuilder.vercel.app/pricing).
  4. Notice that navigation works as expected.
  5. Refresh the page on a subpage (https://qrbuilder.vercel.app/pricing).
  6. Observe the 404 Not Found error.

Image Before Reload: Screenshot 2024-05-14 at 4 58 28 PM

After Reload: Screenshot 2024-05-14 at 4 58 36 PM

Rahul-Sahani04 avatar May 14 '24 11:05 Rahul-Sahani04