Rewriting a URL in an Azure web app

前端 未结 3 1881
慢半拍i
慢半拍i 2020-11-27 21:59

I have a simple wildcard routing rule I want to apply for my Azure web app.


  

        
3条回答
  •  一向
    一向 (楼主)
    2020-11-27 22:13

    If simply want all URL's that resolve to this server & site to redirect to index.html you could use this rewrite section:

    
        
            
                
                    
                        
                        
                    
                
            
        
    
    

    This is very similar to what you have except some minor syntax fixes e.g. the pattern should be ".*" and the rewrite URL target simply "index.html". Note this means that ALL URL's to your site will be rewritten, even for other resources like CSS and JS files, images etc. So you'd better be fetching your resources from other domains.

提交回复
热议问题