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服务器,发现这货简单的没有 ...
随机推荐
- mysql导入sql脚本
例如:我的用户名是root 密码是123 sql脚本存在C盘 名字为test.sql 数据库为test 有两种方法可以执行脚本 1:打开CMD输入以下命令(不需要转换目录)>mysql -u r ...
- 如何利用jsp实现防盗链功能
index.jsp ----------------------------- Place your content here here is index jsp get header info a. ...
- 函数式编程——C#理解
转自:http://www.cnblogs.com/xiaozhi_5638/p/4762846.html 目录 一个问题 函数式编程中的函数 数学与函数式编程 混合式编程风格 一个问题 假设现在我们 ...
- VMware Fusion 5 正式版序列号
HV4KJ-2X10K-VZ768-DRAGP-8CU2F MY63N-D0HE2-0ZXC1-HV954-937JL
- 【Python】【Flask】前端调用后端方法返回页面
后端代码: @app.route("/test",methods=['POST','GET']) def test(): return "我是测试的" 前端代码 ...
- 第三百八十二节,Django+Xadmin打造上线标准的在线教育平台—xadmin管理员详情页面布局,导航图标设置
第三百八十二节,Django+Xadmin打造上线标准的在线教育平台—xadmin进阶 1.后台管理员详情页面布局 后台管理员详情页面,区块是可以拖动的,而且分为了很多个区块 这个页面的布局在xadm ...
- Maven是一个项目管理工具
Maven是一个项目管理工具,它包含了一个项目对象模型 (Project Object Model),一组标准集合,一个项目生命周期(Project Lifecycle),一个依赖管理系统(Depen ...
- Zookeeper系统设计的优点
转自:Zookeeper系统设计的优点.http://webcache.googleusercontent.com/search?q=cache:s6fr40t_5ncJ:www.chaozh.com ...
- (实用)使用unetbootin制作Linux的U盘启动盘
本文介绍在Ubuntu(基于Debian的操作相同)使用unetbootin将Linux操作系统的安装镜像烧录到U盘中,使得U盘成为安装介质.当然,windows系统下也同样可以使用该软件的相应版本. ...
- B/S模式实现批量打包apk
界面流程 界面例如以下: 这是一个使用html编写的界面,界面分为两半.两个frame.左边为操作栏,右边为控制台输出. 打包流程: 选择须要打包的渠道后,点击打包,等待server打包,并把日志输出 ...