IIS中的URL重定向 [英] URL Redirection in IIS
问题描述
大家好,
我有一个网站名称"http://servername".现在,我在根站点("http://servername/test")下创建了另一个子站点.
现在,我想使用其他URL访问此子站点,即,如果用户在浏览器中键入URL说"http://xyz.com",则在内部它应重定向到子站点"http://servername/test"并显示其数据,但浏览器中的URL应显示为"http://xyz.com".
请告诉我是否可以通过在IIS级别上进行一些设置或编写一些自定义代码来实现它.
预先感谢,
Alok ...
Hi all,
I have a web site name "http://servername". Now I have created another subsite under the root site ("http://servername/test").
Now I want access this sub site using some other url i.e. if user types a URL say "http://xyz.com" in browser then internally it should redirect to the sub site "http://servername/test" and show its data but URL in the browser should be shown as "http://xyz.com".
Please let me know if I can achieve it by doing some setting on IIS level or writing some custom code.
Thanks in advance,
Alok...
推荐答案
使用ASP进行URL重写. NET [ ^ ]
http://msdn.microsoft.com/en-us/library/ms972974.aspx [ ^ ]
URL Rewriting with ASP.NET[^]
http://msdn.microsoft.com/en-us/library/ms972974.aspx[^]
阅读此处:
使用ASP.NET进行URL重写 [ MSDN:URL重写 [ URL路由 [
Read here:
URL Rewriting with ASP.NET[^]
MSDN: URL Rewriting[^]
OR
Read about, In ASP.NET 4.0: URL Routing[^]
这篇关于IIS中的URL重定向的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!