Open Closed

Cannot access deep angular links #828


User avatar
0
paul.harriman created

Check the docs before asking a question: https://docs.abp.io/en/commercial/latest/ Check the samples, to see the basic tasks: https://docs.abp.io/en/commercial/latest/samples/index The exact solution to your question may have been answered before, please use the search on the homepage.

  • ABP Framework version: v4.0.2
  • UI type: Angular
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Seperated (Angular): yes / no
  • Exception message and stack trace:
  • Steps to reproduce the issue:

We are able to use "deep links" when entering a client side address in the browser address bar, when testing locally. An example deep link is: http://otis.com/dashboard. When we promote the website to azure we are not able to access deep links. We can however access the "index.html". When we try and access a deep link, we get an error "The resource you are looking for has been removed, had its name changed, or is temporarily unavailable." dev tools shows: "Failed to load resource: the server responded with a status of 404 (Not Found)". The only difference that we see is locally we are using http, in azure we are using https. I tried looking at the middleware routes in .netcore, but I do not see them. Perhaps they are buried somewhere in the archecture. This is where in previous non abp environments I would have expected to see a spa route (a route that just redirects to the index.html, so that angular can handle the routing)


1 Answer(s)
  • User Avatar
    0
    armanozak created

    Hi,

    Yes, the Angular app is a single-page application. So, the web server that runs it should be configured to redirect all routes to the index.html file. Please read this section in our documentation and check the official Azure library for deployment.

    Please let us know if this answers your question.

Made with ❤️ on ABP v9.1.0-preview. Updated on December 13, 2024, 06:09