点IP到虚拟路径 [英] point ip to a virtual path

查看:109
本文介绍了点IP到虚拟路径的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有1个IP和几个域名的web服务器asp.net。

让说:
174.1.1.1


  

与domain.com domain2.com domain3.com


如果我去174.1.1.1这表明

正在建设中
你试图查看该网站目前还没有默认页。它可能是正在升级和配置的过程。

所以,如果我浏览到174.1.1.1我希望它重定向到domain2.com

让我怎么能做到这一点?

我在使用Visual Studio 2010与Win XP的和IIS


解决方案

<一个href=\"http://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/6b855a7a-0884-4508-ba95-079f38c77017.mspx?mfr=true\"相对=nofollow> IIS6:将请求重定向到另一个网站或目录


  

      
  1. 在IIS管理器中,展开本地计算机,右键单击要重定向的网站或目录,然后单击属性。

  2.   
  3. 单击主目录,虚拟目录,或目录选项卡。

  4.   
  5. 在内容为此源应来自,单击一个重定向到URL。

  6.   
  7. 在重定向到框中,键入目标目录或网站的URL。例如,重定向为文件的所有请求
      在目录目录到NewCatalog目录,键入
      / NewCatalog。

  8.   

IIS7:配置Web服务器重定向请求确切的目的地


  

      
  1. 打开IIS管理器,然后导航至要管理的级别。有关如何打开IIS管理器的信息,请参阅打开IIS管理器(IIS 7)。
      有关导航在用户界面的位置根据您的信息
      IIS管理角色,请参见导航在IIS管理器(IIS 7)。

  2.   
  3. 在功能视图中,双击HTTP重定向。

  4.   
  5. 在HTTP重定向页面,在重定向行为,选择重定向到确切的目的地(而不是相对于所有的请求
      目的地)。

  6.   
  7. 在操作窗格中,单击应用。

  8.   

I have a webserver asp.net with 1 ip and several domain name.

let say: 174.1.1.1

with domain.com domain2.com domain3.com

If i go to 174.1.1.1 it show

"Under Construction The site you are trying to view does not currently have a default page. It may be in the process of being upgraded and configured."

So If I navigate to 174.1.1.1 I want it redirect to domain2.com

so how can I do that?

I'm using visual studio 2010 with win xp and iis

解决方案

IIS6: To redirect requests to another Web site or directory

  1. In IIS Manager, expand the local computer, right-click the Web site or directory you want to redirect, and click Properties.
  2. Click the Home Directory, Virtual Directory, or Directory tab.
  3. Under The content for this source should come from, click A redirection to a URL.
  4. In the Redirect to box, type the URL of the destination directory or Web site. For example, to redirect all requests for files in the Catalog directory to the NewCatalog directory, type /NewCatalog.

IIS7: Configure the Web Server to Redirect Requests to an Exact Destination

  1. Open IIS Manager and navigate to the level you want to manage. For information about opening IIS Manager, see Open IIS Manager (IIS 7). For information about navigating to locations in the UI based on your IIS administrative role, see Navigation in IIS Manager (IIS 7).
  2. In Features View, double-click HTTP Redirect.
  3. On the HTTP Redirect page, under Redirect Behavior, select Redirect all requests to exact destination (instead of relative to destination).
  4. In the Actions pane, click Apply.

这篇关于点IP到虚拟路径的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆