使用IIS将子域重定向到子文件夹

时间:2016-08-10 12:07:02

标签: asp.net redirect iis

我在服务器上托管公司网站:

www.example.com

我创建了一个由博客托管公司托管的博客,该博客位于单独的服务器上:

mynewblog.bloghostingcompany.com/[subpages]

如何创建URL重定向,以便从我自己服务器上的子文件夹中指向博客:

www.example.com/blog/[subpages]

我在我的web.config中尝试了这个,但是在浏览器中将url更改为mynewblog.bloghostingcompany.com。我想"指向"到外部服务器但仍然在浏览器中看到子文件夹。

<rewrite>
    <rules>
        <rule name = "Blog URL Rewrite" >
            < match url="^blog/([0-9]+)/([_0-9a-z-]+)" />
            <action type = "Rewrite" url="mynewblog.bloghostingcompany.com/[subpages]{R:1}" />
        </rule>
    </rules>
</rewrite>

这可能吗?

0 个答案:

没有答案
相关问题