<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml">
<wml>
<head><meta forua="true" http-equiv="Cache-Control" content="max-age=0" /></head>
<card title="php在IIS下怎么设置伪静态" id="card1">
<p> 游客</p><p>
标题:php在IIS下怎么设置伪静态<br/>
正文:<br/>
有的win主机IIS不支持 .htaccess 文件, 我在这里指的不是本地 在本地的话用apmserv服务器可以用.htaccess 文件，用apmserv服务器环境配置伪静态可以看 php 伪静态 (url rewrite mod_rewrite 重写) 这篇文章，讲的很详细.这里我们主要讲解httpd.ini 废话不说直接看效果~例： www.camnpr.com/index.php我们想让他用 www.camnpr.com/index.html 来直接访问www.camnpr.com/newxx.php?=10 [newxx.php是新闻的详细页面]我们把他伪静态成为 www.camnpr.com/new-10.html实现过程如下：httpd.ini 的源文件[ISAPI_Rewrite]# 3600 = 1 hour# CacheClockRate 3600RepeatLimit 32# Protect httpd.ini and httpd.parse.errors files# from accessing through HTTPRewriteRule ^/httpd(?:\.ini|\.parse\.errors).* [F,I,O]RewriteRule /index.html /index.phpRewriteRule /new-([0-9]+).html$ /newxx\.php\?uid=$1上面的例子可以看出 RewriteRule /index.html /index.php是把index.php转换为 index.htmlRewriteRule /new-([0-9]+).html$ /newxx\.php\?uid=$1 转换为 new-10{这个10为id=几的值}.html很简单吧。 这种伪静态一般 win主机的空间商基本都支持的！<br/><a href="http://camnpr.com/wap.asp?mode=WAP&amp;act=View&amp;id=1757&amp;Page=1">[&lt;&lt;]</a><a href="http://camnpr.com/wap.asp?mode=WAP&amp;act=View&amp;id=1757&amp;Page=1">[[1]]</a><a href="http://camnpr.com/wap.asp?mode=WAP&amp;act=View&amp;id=1757&amp;Page=1">[&gt;&gt;]</a><br/>
<br/>
<a href="wap.asp?act=Com&amp;id=1757">查看评论(0)</a><br/>
<a href="wap.asp?act=AddCom&amp;inpId=1757">发表评论</a><br/><br/>

<br/>

<br/>
<a href="http://camnpr.com/wap.asp">首页</a>
</p>
</card>
</wml>