deploy_feedback icon indicating copy to clipboard operation
deploy_feedback copied to clipboard

404 Error on all Paths except home path in Deno React Deployment, Works on Vercel

Open gotitthanks opened this issue 2 years ago • 1 comments

Description: When accessing the default path (https://mrdcare-frontend.deno.dev/), the website loads successfully, displaying the login page. However, attempting to access the login page directly using the URL https://mrdcare-frontend.deno.dev/login results in a 404 Not Found error.

Steps to Reproduce:

Open https://mrdcare-frontend.deno.dev/ (Default path) Expected: Login page should load successfully. Actual: Login page loads correctly.

Open https://mrdcare-frontend.deno.dev/login (Specific path) Expected: Login page should load successfully. Actual: 404 Not Found error is displayed.

Open https://mrdcare-frontend.vercel.app/ (Vercel hosting) Expected: Login page should load successfully. Actual: Login page loads correctly.

Open https://mrdcare-frontend.vercel.app/login (Vercel hosting) Expected: Login page should load successfully. Actual: Login page loads correctly.

Additional Information: The issue is all pages except home page giving 404 specific to the Deno react deployment at https://mrdcare-frontend.deno.dev/. The same project is working properly when hosted on Vercel at https://mrdcare-frontend.vercel.app/.

gotitthanks avatar Jan 11 '24 18:01 gotitthanks

It sounds like you are trying to run an SPA on Deno Deploy. Deno Deploy can be thought of more as a function platform and won't rewrite paths to / on the server automatically.

marvinhagemeister avatar Jan 12 '24 10:01 marvinhagemeister