404 Error on all Paths except home path in Deno React Deployment, Works on Vercel
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/.
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.