I recently enabled pretty URLs in my Angular application by switching to html5mode.
However, whenever I try to refresh the page, I encounter a 404 error.
For instance, if I access my app through , everything functions as expected. But when I attempt to refresh the page or access a specific page like , I receive a 404 error.
Note:
- During compilation of my application, I bundle templates into JavaScript files.
- After compilation, my scripts (including templates) are placed in the build folder with the base tag in index.html set to "/".
- I am utilizing Angular-ui-router for routing.
- The backend is built on .NET technology.
- The frontend and backend applications are completely separate and deployed on IIS.
I would greatly appreciate any suggestions for potential solutions or reasons behind this error.
Thank you