如何从MVC3应用程序中的多个域名重定向到不同的页面 [英] How to redirect to the different pages from the multiple domain names in MVC3 Application
问题描述
大家好,
我有一个mvc3应用程序,并且我的客户端为同一个网站注册了多个域名.
现在我想做的是,当用户输入一个URL名称时,我必须将其重定向到我网站的子页面.
例如.
1)如果我输入www.xxx-partner.com,则应该转到www.xxx.com/partner
1)如果我输入www.xxx-business.com,它应该将您带到www.xxx.com/business
我应该怎么做,使用jquery或javascript或常规重定向,如果你们有任何示例.请帮帮我.
谢谢...
-
Hi Guys,
I have a mvc3 application and my client has multiple domain names registered for the same website.
Now what i wanted to do is when user enters a url name i have to redirect it to the sub-pages of my website.
For eg.
1) if i enter www.xxx-partner.com , it should take you to www.xxx.com/partner
1) if i enter www.xxx-business.com , it should take you to www.xxx.com/business
How should i do this, use jquery or javascript or normal redirection, If you guys have any samples. please help me.
Thank you ...
--
推荐答案
ASP.NET 2.0中的URL重写 [ ^ ]
http://pietschsoft.com/post/2005/06/29/ASPNET-20-Rewriting-URL-Paths-just-got-a-whole-lot-easier.aspx [
URL Rewriting in ASP.NET 2.0[^]
http://pietschsoft.com/post/2005/06/29/ASPNET-20-Rewriting-URL-Paths-just-got-a-whole-lot-easier.aspx[^]
这篇关于如何从MVC3应用程序中的多个域名重定向到不同的页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!