2017-04-26 30 views
0

我们有一个具有别名(alias.com)的域(domain.com)。我们正在使用Plesk和Windows Server。在Plesk中,alias.com被设置为domain.com的别名。将域别名转发到特定页面

我们需要当人们访问alias.com时,它会转到主域中的某个页面,例如domain.com/this-page.html。

该网站是一个ASP.NET MVC网站,以防我们可以使用web.config做些事情。

这可能吗?我们应该怎么做?

回答

0

在目录中打开web.config文件在旧页驻留 那么对于旧位置的路径和新的目的地添加代码如下:

<configuration> 
    <location path="services.htm"> 
    <system.webServer> 
     <httpRedirect enabled="true" destination="http://example.com/services" httpResponseStatus="Permanent" /> 
    </system.webServer> 
    </location> 
    <location path="products.htm"> 
    <system.webServer> 
     <httpRedirect enabled="true" destination="http://example.com/products" httpResponseStatus="Permanent" /> 
    </system.webServer> 
    </location> 
</configuration> 
相关问题