重要! 选择下面的语言后,整个页面内容将自动更改为该语言。
URL 重写模块 2.0 提供基于规则的重写机制,可在 Web 服务器处理请求的 URL 之前对其进行更改,以及在向 HTTP 客户端提供响应内容之前修改响应内容。
-
IIS URL 重写模块 2 是一个增量版本,其中包括版本 1.1 中的所有功能,并增加对出站响应重写的支持。 更确切地说,它可用于:
- 实现复杂 URL 重写逻辑,方法是使用以 .NET 编写的自定义重写提供程序。
- 将在响应 HTML 中的 Web 应用程序生成的 URL 替换为对用户和搜索引擎更友好的等效 URL。
- 使用正则表达式模式匹配修复任意 HTTP 响应的内容。
- 修改 HTTP 请求头和 IIS 服务器变量。
- 修改 HTTP 响应头
安装程序包包括 URL 重写模块 2.0 所需的几个其他组件和修补程序。 有关更多详细信息,请参阅这些修补程序的知识库文章。 为正确应用这些修补程序而无需重新启动服务器,建议在安装 URL 重写模块 2.0 之前停止 WAS 服务。 将安装 URL 重写模块 2.0 的以下修补程序:- IIS 7.0 FastCGI 模块的更新(可能为英文页面)(KB 954946);
- IIS 7.0 SetUri 功能的修补程序(可能为英文页面)(KB 949172);
- ASP.NET System.Web.dll 的修补程序(可能为英文页面)(KB 957660)。
支持的操作系统
Windows 7, Windows Server 2008, Windows Server 2008 Datacenter, Windows Server 2008 Datacenter without Hyper-V, Windows Server 2008 Enterprise, Windows Server 2008 Enterprise without Hyper-V, Windows Server 2008 R2, Windows Server 2008 R2 Datacenter, Windows Server 2008 R2 Enterprise, Windows Server 2008 R2 SP1, Windows Server 2008 R2 Standard, Windows Server 2008 Service Pack 2, Windows Server 2008 Standard, Windows Server 2008 Standard without Hyper-V, Windows Server 2012, Windows Server 2012 R2, Windows Vista 64-bit Editions Service Pack 1, Windows Web Server 2008, Windows Web Server 2008 R2
-
- 必须安装 Internet Information Services 7
- IIS 7 支持新共享配置环境,在为每个节点安装 URL 重写模块之前,必须在 Web 场中的每台服务器上将其禁用。 注意:在安装 URL 重写模块后,可重新启用共享配置。
-
需要以管理员身份运行安装软件包。 为此,可以采用以下方法之一:
- 使用名为“Administrator”的实际帐户登录到服务器。
- 使用具有管理员权限的帐户登录,再通过右键单击“命令提示符”菜单项(位于 Windows 程序的“附件”菜单中)并选择“以管理员身份运行”打开命令提示符,然后键入下面列出的命令:
msiexec /I rewrite_2.0_rtw_x64.msi
注意: - 如果已经安装了早期版本的 URL 重写模块(如 v1.0 和 v1.1),则必须将其升级到 v2.0
- 如果已经安装了 RC 版本的 URL 重写模块 2.0,则必须将其更新到 RTW 版本。