[英]IIS URL rewrite module- redirect rule not working
<rewrite>
<rules>
<rule name="Redirect CM" patternSyntax="ECMAScript" stopProcessing="true">
<match url="^HVProduct$" />
<action type="Redirect" url="http://www.CMMDesign.com/Management/Contact" appendQueryString="false" />
</rule>
</rules>
</rewrite>
I wanted to redirect users to another page when ever they try to access "www.CMMDesign.com/HVProduct" redirect to "http://www.CMMDesign.com/Management/Contact"当用户尝试访问“www.CMMDesign.com/HVProduct”重定向到“http://www.CMMDesign.com/Management/Contact”时,我想将用户重定向到另一个页面
I tried with exact match and wild card also not working.我尝试使用完全匹配和通配符也不起作用。 Any ideas?
有任何想法吗?
First you must install the URL rewrite module, if not installed, please follow the steps below to install:首先必须安装URL重写模块,如果没有安装,请按照以下步骤进行安装:
1):Visit http://www.iis.net/downloads/microsoft/url-rewrite ; 1):访问http://www.iis.net/downloads/microsoft/url-rewrite ;
2):At the bottom of the page you can download the installer without using Web Platform. 2):在页面底部,您可以在不使用Web Platform的情况下下载安装程序。
3):Run the MSI installer to add the URL Rewrite Module to your server. 3):运行MSI安装程序,将URL重写模块添加到您的服务器。
Then modify your URL Rewrite rules as follows:然后修改你的 URL Rewrite 规则如下:
<rewrite>
<rules>
<rule name="Test" stopProcessing="true">
<match url="(.*)(HVProduct)" />
<action type="Redirect" url="http://www.CMMDesign.com/Management/Contact" />
</rule>
</rules>
</rewrite>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.