- 时间:2021-05-28 16:21 编辑: 来源: 阅读:
- 扫一扫,手机访问
摘要:IIS安装Apache伪静态插件的具体操作图文
Apache和IIS分别有自己的伪静态操作方法,那在Servers2003_IIS需要给PHP程序使用伪静态呢?安装rewrite插件包。
[b]一、下载rewrite插件包,一般里面必须有httpd.ini和Rewrite.dll,如图:
[img]http://files.jb51.net/file_images/article/201307/201307011446085.jpg[/img]
[/b]
[b]二、一般推荐将伪静态包放至网站根目录下,然后在需要伪静态的网站右击选择属性[/b],如图:[img]http://files.jb51.net/file_images/article/201307/201307011446086.jpg[/img]
,找到ISAPI筛选器,添加rewrite.dll,关闭IIS后再打开,发生优先级变成高,如图:[img]http://files.jb51.net/file_images/article/201307/201307011446087.jpg[/img]
,说明安装成功了。
[b]三、打开httpd.ini,开始配置伪静态
[/b]
[ISAPI_Rewrite]
# 3600 = 1 hour
CacheClockRate 3600
RepeatLimit 32
# Protect httpd.ini and httpd.parse.errors files
# from accessing through HTTP
# =====以上是默认代码建议不改,#为注释=====
#RewriteRule --伪静态编辑
#^/ 前置为域名
#/$ 此处为止
#/ --被伪静态-- \ --后缀-- \
RewriteRule ^/webiste/$ /webiste/index\.php\
#([a-z]+) --正则表达式
#一个()代表一个$数字
#(/?) --表示/可有可无
RewriteRule ^/webiste/([a-z]+)(/?)$ /webiste/$1\
[b]四、伪静态是实时更新的,所以可以做即时测试。
[/b]PS:([a-z0-9]+),(/page?)([a-z0-9]+)(/?)