Setting up Angular deep linking on IIS

前端 未结 2 1079
一向
一向 2021-01-21 05:28

I\'m trying to configure an Angular/ASP.NET 5 application on IIS to support deep linking, so that a URL such as domain.com/article/title-slug works

I\'ve added the follo

2条回答
  •  时光说笑
    2021-01-21 05:40

    I ended up fixing this by scrapping the URL rewrite module and handling this in code:

            app.Run(async (context) =>
           {
               context.Response.ContentType = "text/html";
               await context.Response.SendFileAsync(Path.Combine(env.WebRootPath, "index.html"));
           });
    

提交回复
热议问题