IIS URL Rewrite – Installation and Use
IIS URL Rewrite – Installation and Use
Posted by Nick LeFevre | Leave a reply
IIS URL Rewrite Installation
To get the below URL Rewrite code to work in IIS, you must first install the URL Rewrite module. The URL Rewrite module is not installed by default. The IIS URL Rewrite module may be a better solution than HTTP Redirect in IIS. You can effectively “redirect” from http://domain.com to http://www.domain.com. Of course the URL rewrite has many more uses and features, but we will use it for redirection purposes in this tutorial.
To install the IIS URL Rewrite module: Go Here and click install… Or just click here. Once installed you may need to reboot.

Install IIS URL Rewrite Module
IIS URL Rewrite after Installation
You can double click and make your URL rewrite rule using the interface, or edit the web.config. See below.

IIS URL Rewrite Module
IIS URL Rewrite code in the web.config
IIS URL Rewrite http:// to http://www
<!--web.config url rewrite-->
<system.webServer>
<rewrite>
<rules>
<rule name="RedirectToWWW" stopProcessing="true">
<match url=".*" ignoreCase="true" />
<conditions>
<add input="{HTTP_HOST}" pattern="^domain.com$" />
</conditions>
<action type="Redirect" url="http://www.domain.com/{R:0}" redirectType="Permanent" />
</rule>
</rules>
</rewrite>
</system.webServer>
Previous to IIS7 this was handled in:
Older IIS URL Rewrite was contained between these tags
<system.web>
</system.web>
The above code can be viewed in the URL rewrite module interface. It’s illustrated below. You may add or modify in either the web.config, or this interface. The main thing is to get it installed, and most likely reboot.
URL Rewrite Rules Interface in IIS
URL Rewrite Interface in IIS
IIS 7 redirect using URL Rewrite
Notice under the “Action” section in the above image there is a selection for “Action type”. Among other choices you can choose Redirect. Choose “Redirect.” Once selected there are then places for you to select “Redirect URL,” and “Redirect type,” such as “Permanent (301).”
Search Terms:
URL Rewrite, URL Rewrite IIS, iis 7 redirect, http://domain.com to http://www.domain.com, IIS URL Rewrite, IIS urlrewrite, URL rewriting, IIS rewrite, rewrite url, urlrewrite, URL Rewrite asp.net, url rewriting asp.net, URL Rewrite module, IIS7 URL Rewrite module, IIS rewrite url, url rewrite tutorial, url rewriting IIS, IIS url rewriting, rewrite IIS, asp url rewrite, IIS7 rewrite, asp.net rewrite url, IIS7 rewrite, IIS redirect url, rewrite url asp.net, IIS url rewrite module, asp.net url rewriting, http redirect, url redirection, IIS redirect.
IIS URL Rewrite – Installation and Use的更多相关文章
- IIS URL Rewrite redirect from one Domain to another
IIS URL Rewrite enables Web administrators to create powerful rules to implement URLs that are easie ...
- Windows10中的IIS10安装php manager和IIS URL Rewrite 2.0组件的方法
Windows10中自带的Server:Microsoft-IIS/10.0,然后这个10却让原本支持组件无法安装了,php manager组件安装时提示“必须安装IIS7以上才可以安装”.那是不是真 ...
- IIS URL Rewrite Module防盗链规则配置方法
IIS版本:IIS 7.5 URL Rewrite组件:IIS URL Rewrite Module(http://www.iis.net/downloads/microsoft/url-rewrit ...
- IIS URL Rewrite Module的防盗链规则设置
IIS版本:IIS 7.5 URL Rewrite组件:IIS URL Rewrite Module(http://www.iis.net/downloads/microsoft/url-rewrit ...
- Windows10 IIS安装php manager和IIS URL Rewrite 2.0组件的方法
Windows10中自带的Server:Microsoft-IIS///8.5/10上安装.微软脑子秀逗,跳过了9,以为能解决版本识别的问题,没想到弄成10,还是出现了版本识别的问题,真是自己打自己的 ...
- IIS URL Rewrite(URL 重写)-使用教程
IIS URL Rewrite(URL 重写)-使用教程 作者:vkvi 来源:千一网络(原创) 日期:2011-8-17 http://www.cftea.com/c/2011/08/9CRXOL ...
- IIS:URL Rewrite实现vue的地址重写
vue-router 全局配置 const router = new VueRouter({ mode: 'history', routes: [...] }) URL Rewrite 1.添加规则 ...
- iis url rewrite http->https non-www->www
<system.webServer> <rewrite> <rules> <rule name="Redirect abc.com to www&q ...
- IIS 7.5 使用URL Rewrite模块简单设置网页跳转
原文 IIS 7.5 使用URL Rewrite模块简单设置网页跳转 我们都知道Apache可以在配置文件里方便的设置针对网页或网站的rewrite,但是最近接手了一组IIS服务器,发现这货简单的没有 ...
随机推荐
- 升级R语言
Linux (RedHat, CentOS)上升级R语言: sudo yum install R Windows上升级R语言: install.packages("installr" ...
- Ubuntu上CUDA环境搭建
1.下载CUDA:https://developer.nvidia.com/cuda-toolkit-archive (如果已经安装了N卡驱动,最好用.deb,如果没有安装,可以用.run) 2.根据 ...
- kali 无法使用ifconfig等常用命令
kali无法使用ifconfig apt-get -y install net-tools
- Css格式化/压缩(代码)
function $() { var elements = new Array(); for (var i = 0; i < arguments.length; i++) { var eleme ...
- Maven快照
大型应用软件一般由多个模块组成,一般它是多个团队开发同一个应用程序的不同模块,这是比较常见的场景.例如,一个团队正在对应用程序的应用程序,用户界面项目(app-ui.jar:1.0) 的前端进行开发, ...
- e790. 设置JSpinner的边框
// Create a number spinner JSpinner spinner = new JSpinner(); // Get the text field JFormattedTextFi ...
- c fopen fread 错误
真的被,读取一个txt文本,结果一个早上都没搞好 程序如下: 能看出哪里有问题么,输出字符串,得到的结果后面有“屯”或则 “烫”,单个字符输出来也有,为何,搜啊搜,改txt的内容,依旧不行 最后 改f ...
- u3d中 rect[2] == rt->GetGLWidth() && rect[3] == rt->GetGLHeight()错误的原因及解决方法
原文:http://blog.csdn.net/wolf96/article/details/38363161 官方是这么解释的 http://issuetracker.unity3d.com/iss ...
- MD5 哈希等各种加密方式 都是对这个对象进行各种运算, 然后得出1个字符串
你列出的4个 都是对对象的 加密算法
- CentOS6.5下安装iRedMail中需要解决的问题
iRedMail是个专门用于Redhat/CentOS下的企业Mail服务集成安装软件包,本来只要有干净的系统就可以轻松安装,无奈国内网络状况和墙头众多,安装中也有很多问题需要解决,下面记录的都是我安 ...