Setting up Angular deep linking on IIS

前端 未结 2 1112
一向
一向 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:34

    Was running into the same issue. After tinkering with a number of things, changing the base href tag in the index.html file to the fully qualified Url is what finally fixed it for me.

    Before:

    
    
    
      
        
        MySubApp
        
    
        
        
    
    
      
    
      
        
    
      
    
    
    

    After:

    
    
    
      
        
        MySubApp
        
    
        
        
    
    
      
    
      
        
    
      
    
    
    

    My Rewrite rule:

    
    
        
            
                
                    
                        
                        
                            
                               
                          
                        
                    
                
            
        
    
    

    My use case was setting up an application under the default website, so your setup might be different.

提交回复
热议问题