Best practice for http redirection for Windows Azure

前端 未结 2 1845
耶瑟儿~
耶瑟儿~ 2021-01-31 05:51

I have an azure website which is named:

  • http://myapp.cloudapp.net

Of-course this URL is kind of ugly so I set up a CNAME that points

2条回答
  •  醉梦人生
    2021-01-31 06:17

    You might want to instead use the IIS rewrite module (seems "cleaner"). Here's a blog post that shows how to do this: http://weblogs.asp.net/owscott/archive/2009/11/30/iis-url-rewrite-redirect-multiple-domain-names-to-one.aspx. (You'll just need to put the relevant markup in web.config.)

    An example rule you could use is:

        
            
            
                
            
            
        
    

提交回复
热议问题