我们有一个具有别名(alias.com(的域(domain.com(。我们正在使用Plesk和Windows Server。在Plesk,Alias.com被设置为Domain.com的别名。
我们需要,当人们访问alias.com时,它将转到主要域内的某个页面,例如domain.com/this-page.html。
该网站是一个ASP.NET MVC网站,以防我们可以使用web.config做某事。
这可能吗?我们该怎么做?
在旧页面驻留的目录中打开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>