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 ...
最新文章
- 第十六届智能车竞赛英飞凌技术培训日程安排
- 格式资料python sqlalchemy 查询结果转化为 Json格式
- NYOJ 17 单调递增最长公共子序列
- Nginx关于浏览器缓存相关的配置指令
- Python 数据分析三剑客之 NumPy(一):理解 NumPy / 数组基础
- a==b和a.equals(b)的区别
- Java之AOP解释
- windows phone开发环境搭建
- .Net之路(四)利用DataTable、DataSet返回SQL Server的表或者单个字段
- 转科普CPU Cache line
- Mahout实战---编写自己的相似度计算方法
- arcpy 土地整治报备坐标文件导出(解决内环问题)
- lfw分类 python_LFW精确度验证__python读写txt
- 樱花大战资源分析之二 SPR文件格式不完全分析
- Spring之Bean后处理器——InstantiationAwareBeanPostProcessor的使用与源码解析
- 十分钟带你解读什么是Promise异步编程
- substance painter贴图导入UE4显示效果不一样的解决方法
- 运动装备品牌排行榜,运动爱好者必备好物分享
- AriaNg | 一款基于aria2高速图形化界面下载器
- 微信小程序内容接入安全检测接口