iis下ISAPI_Rewrite配置及 iis rewrite 规则书写
1. 下载 ISAPI_Rewrite 我这里的 1.3
2. 进入iis 信息管理器,点网站-->属性-->ISAPI删除原来的筛选器
3. 点击某个站点-->属性-->添加ISAPI筛选器,我的原则是放到各自己自己的站点下,如在站点里建一个目录ISAPI_Rewrite,然后把 ISAPI_Rewrite.dll 和 httpd.ini 放这里
4. 配置好重启一下 iis ,接下来就是调试 httpd.ini 了,
5. 调试httpd.ini 不需要重启 iis 和站点
6. httpd.ini 编写规则需要注意的是: .?这些要转义 \.\?
例子:
[ISAPI_Rewrite]
# 3600 = 1 hour
CacheClockRate 3600
RepeatLimit 32
#RewriteCond %{REQUEST_URI} !/(.*)_([0-9]+).*\.html$
RewriteRule /auction_(.*)_([0-9]+).*\.html$ /productdetails\.php\?aid=$2 [L]
RewriteRule /all_auctions_([0-9]+)_([0-9]+)_EndedAuction.*\.html$ /allauctions\.php\?pgno2=$2&id=$1&hashtag=EndedAuction
RewriteRule /all_auctions_([0-9]+)_([0-9]+)_FutureAuction.*\.html$ /allauctions\.php\?pgno3=$2&id=$1&hashtag=FutureAuction
RewriteRule /all_auctions_([0-9]+)_([0-9]+).*\.html$ /allauctions\.php\?pgno=$2&id=$1
RewriteRule /all_auctions_([0-9]+)_(.*).*\.html$ /allauctions\.php\?pgno=$1&st=$2
RewriteRule /all_auctions_([0-9]+).*\.html$ /allauctions\.php\?id=$1
RewriteRule /all_auctions_([0-9]+)_([0-9]+)_VIP.*\.html$ /allauctions\.php\?id=$1&vid=$2
RewriteRule /all_ended_auctions_([0-9]+)_([0-9]+)_([a-zA-Z]).*\.html$ /allauctions\.php\?aid=$1&pgno2=$2&hashtag=$3
RewriteRule /all_future_auctions_([0-9]+)_([0-9]+)_([a-zA-Z]).*\.html$ /allauctions\.php\?aid=$1&pgno3=$2&hashtag=$3
RewriteRule /all_([a-z]+)_auctions_([0-9]+)_([a-zA-Z]).*\.html$ /allauctions\.php\?aid=$2&hashtag=$3
RewriteRule /all_([a-z]+)_auctions_([0-9]+)_([0-9]+).*\.html$ /allauctions\.php\?aid=$2&pgno=$3
RewriteRule /all_([a-z]+)_auctions_([0-9]+).*\.html$ /allauctions\.php\?aid=$2
RewriteRule /bid_history_([0-9]+)_N.*\.html$ /bid_history\.php\?pgNo=$1
RewriteRule /([a-zA-Z_]+)_([0-9]+).*\.html$ /$1\.php\?pgno=$2
RewriteRule /(.*)\.html$ /$1\.php [I]
7. 如果IIS网站 已经配置了ISAPI筛选器, 其实也可以用. 那么每一个站点的 httpd.ini 就是放在站点的根目录下面, 如果不能显示正常,则是httpd.ini 规则的写法问题
补充:
由于我是先删了网站的 ISAPI筛选器,配置了独立站点的 ISAPI筛选器,现在想恢复网站(所有站点都有效)的ISAPI筛选器, 添加之后发现加载不成功, 其实这个需要重启 IIS.
如果站点也配了ISAPI筛选器那么,站点的起作用, httpd.ini 是同站点配的ISAPI筛选器 的ISAPI_Rewrite.dll 同一个目录下的 httpd.ini 生效,而不是站点根目录的 httpd.ini 起作用.
注意:最后可能需要重启IIS服务器,检查一下ISAPI过滤器中Rewrite是否已经载入——绿色的向上箭头。另外,如果是NTFS文件系统,ISAPI_Rewrite的安装目录需要添加网站用户或everyone的写权
转自: http://hi.baidu.com/kemy/blog/item/944aa74431b5d940510ffeb0.html
iis下ISAPI_Rewrite配置及 iis rewrite 规则书写相关推荐
- Nginx配置location及rewrite规则
Nginx配置location及rewrite规则 示例: location = / { # 精确匹配 / ,主机名后面不能带任何字符串 [ configuration A ] } location ...
- nginx location 匹配 多个规则_nginx配置location与rewrite规则教程
nginx配置location与rewrite规则教程 location 教程 示例: location = / { # 精确匹配 / ,主机名后面不能带任何字符串 [ configuration A ...
- 本地配置iis信息服务器,如何配置本地IIS服务器.doc
如何配置本地IIS服务器 如何配置本地IIS服务器(XP系统) 安装:我的电脑----添加删除程序----添加删除windows组件------勾选IIS服务-----详细信息----全部勾选---- ...
- iis下如何配置Rewrite(Rewrite下载与配置)
转载:http://www.cr173.com/html/6893_1.html Apache 下启用与设置 Rewrite 是很简单的事,也很灵活:但IIS下Rewrite需要添加组件,通过筛选器的 ...
- iis php5.3配置,windows+IIS 环境下以Fastcgi方式配置php 5.3.3的方法
还是感觉5.2及以前的版本配置比较方便,使用5.3配置后,我的apache居然挂了,不知道问题出在哪里,没找到解决方法,最后只能ghost还原了一下. 第一步:iis6.0环境配置,这里不多介绍 第二 ...
- Nginx 配置 location 及 rewrite 规则写法总结
转自:http://www.pinlue.com/article/2020/12/2922/1911454587952.html
- 雷林鹏分享:YAF 在Nginx环境下的Rewrite规则
这2天在学习YAF框架,在nginx环境下参照手册配置rewrite规则后,访问页面出现404错误,最后发现是rewrite规则书写上出现了些错误. 手册提供的Nginx的Rewrite: serve ...
- 手动配置 iis php环境,iis上手动配置php
iis下手动配置php 指定php.ini目录(配后要重启才生效) 打开"我的电脑"->"属性"->"高级"->" ...
- Apache Rewrite规则详解[转]
1.Rewrite规则简介:Rewirte主要的功能就是实现URL的跳转,它的正则表达式是基于Perl语言.可基于服务器级的(httpd.conf)和目录级的(.htaccess)两种方式.如果要想用 ...
- Apache Rewrite 规则详解
在开篇之前: 我想说这篇文章其实是我刚刚接触Rewrite的时候学习的文档,应属转载,但是在这里我不想写明原地址,原因是文章中大多数给出的配置命令经实验都是错误的.需要原文的可以在谷歌上搜索一下&qu ...
最新文章
- android studio dump java heap_Android Studio 3.0 Memory Profiler使用
- 马斯克用二手火箭送宇航员上天,还成功避撞碎片!接下来载普通人,建月球基地...
- Python中的yield生成器的简单介绍
- 自学前端的误区和痛点解决办法
- Gridview 鼠标悬浮光棒效果
- HTML5 API详解(14):Notification 实现桌面提醒
- 笨办法学 Python · 续 练习 5:`cat`
- 苹果se2_搜狗输入法适配苹果se2,给用户带来新玩法。
- 今天实现了一个功能就是,树结点的拖动
- 26. Remove Duplicates from Sorted Array【easy】
- 张珺 2015/07/13 个人文档
- hutool工具类的使用,国内自己封装的工具包,挺好用的
- switch在内存中的实现机制
- html5在线拍照,js html5 调用摄像头拍照
- inventor中齿条怎么画_标准齿轮及齿条绘制方法
- Ubuntu 修改 apt 源为阿里云源
- 系统提供人民币(CNY)美元(USD)英镑(GBP)价值转换
- 苹果手机的计算机怎么设置快捷键大全,教程方法;苹果电脑快捷键大全最常用的都在这里了电脑技巧-琪琪词资源网...
- Java基础系列:switch+enum
- 【(类似DP)优化】 分梨子