HTTP重定向为Windows

HTTP重定向为Windows

本文介绍了HTTP重定向为Windows Azure最佳实践的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个蔚蓝的网站,该网站被命名为:

I have an azure website which is named:


  • http://myapp.cloudapp.net

  • http://myapp.cloudapp.net

中,当然这个URL是一种丑恶的,所以我. (您只需把相关的标记在web.config中。)

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:

    <rule name="cloudexchange" stopProcessing="true">
        <match url=".*" />
        <conditions>
            <add input="{HTTP_HOST}" pattern="cloudexchange.cloudapp.net" />
        </conditions>
        <action type="Redirect" url="http://odata.stackexchange.com/{R:0}" />
    </rule>

这篇关于HTTP重定向为Windows Azure最佳实践的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-04 05:54
查看更多