refreshing the page results in 404 error- Angular 6

后端 未结 10 1785
广开言路
广开言路 2020-12-05 06:54

I am building an application with the help of Angular6 and facing problems in routing. All the routes are working when I click on a particu

10条回答
  •  执念已碎
    2020-12-05 07:22

    Starting with Apache 2.4, you can use the FallbackResource directive instead of rewriting, so it will look like:

    FallbackResource /index.html
    

    If you have a different base href (say, /awesomeapp), change it for:

    
        FallbackResource /awesomeapp/index.html
    
    

提交回复
热议问题