Get Angular2 routing working on IIS 7.5

前端 未结 6 968
情深已故
情深已故 2020-12-05 17:37

I have been learning Angular2. The routing works just fine when running on the nodejs lite-server. I can go to the main (localhost:3000) page and move through the applicatio

6条回答
  •  -上瘾入骨i
    2020-12-05 18:15

    Using URL rewrite module will kill routing path inside application. I've changed Error page for 404 Not Found response to my index.html file. This will not change the URL in browser, but server returns the whole application.

    HowTo: Site->Application->Error Pages from context menu on Status Code 404 choose Edit... and choose option Execute URL on this site. Enter /index.html and press OK. Note the path is from site root so you may need to include your app path.

提交回复
热议问题