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服务器,发现这货简单的没有 ...
随机推荐
- linux系统Qt实现简单的任务管理器
继续上次的操作系统课设,这次需要设计一个简单的任务管理器,大部分人选择GTK来实现,我剑走偏锋,使用Qt来完成这个任务. 用户和应用程序可以通过/proc得到系统的信息,并可以改变内核的某些参数.由于 ...
- 关于go语言的环境配置 SDK+path+工作目录
第一步: 安装Golang的SDK http://golang.org,下载最新的安装包,之后双击安装即可. 安装完成之后,打开终端,输入go.或者go version(查看安装版本)出现如下信息即表 ...
- 摄像头驱动0V7725学习笔记连载(三):0V7725 SCCB时序的实现
上一篇博客主要是讲解了关于需要配置的重要寄存器,那么接下来就是要通过SCCB接口实现对OV7725的配置.参考<OmniVision Serial Camera Control Bus (SCC ...
- 【java开发系列】—— 自定义注解
之前在开发中,就总纳闷,为什么继承接口时,会出现@Override注解,有时候还会提示写注解@SuppressWarnings? 原来这是java特有的特性,注解! 那么什么是注解呢? 注解就是某种注 ...
- 3ds Max 中的导航控件SteeringWheels入门介绍
介绍 软件环境:3d Max2015 SteeringWheels 3D导航控件也可以说是“追踪菜单”,通过它们可以使用户从单一的工具访问不同的2D和3D导航工具.SteeringWheels可分成多 ...
- discuz 模板中如何使用方法和语言标签?
第一个问题:如何调用方法? 关于模板中eval的使用{eval php 语句}比如:<!--{eval echo "Hello World!"}--> 工作中遇到一个小 ...
- Java如何从数组中查找对象元素?
在Java中,如何从数组中查找对象元素? 示例 以下示例使用Contains方法来搜索数组中的String对象. package com.yiibai; import java.util.*; pub ...
- unity----------------3D模型讲解
图文详解Unity3D中Material的Tiling和Offset是怎么回事 回到顶部(go to top) Tiling和Offset概述 Tiling表示UV坐标的缩放倍数,Offset表示UV ...
- MongoDB多文档查询
db.getCollection('transactionCompensation').find( { "$and":[ { "status":{ " ...
- Android多国语言的value文件夹命名方式
在res目錄下建立不同名稱的values文件來調用不同的語言包Values文件匯總如下:中文(中國):values-zh-rCN中文(台灣):values-zh-rTW中文(香港):values-zh ...