栏目导航
热点推荐
- 开发者必备,超实用的PHP代码片
- 提高PHP编程效率的53种方法
- PHP精华的代码收藏
- PHP.ini配置文件(中文)
- PHP如何防止注入及开发安全
- 提高PHP编程效率的53个要点
- 实际开发中可能用到的PHP的字符
- PHP无限分类的原理
- PHP验证码类代码( 最新修改,完全
- PHP判断端口是否打开的代码
- PHP网站转移实战经验之谈
- phpMyAdmin配置文件说明
阅览排行
php 实现SEO之伪静态
www.jz123.cn 2010-12-08 来源: 站长家园 责任编辑(袁袁) 我要投递新闻
看看怎么实现:因为笔者的虚拟主机是 IIS 而非 Apache ,所以只写 httpd.ini 的伪静态方法
[ISAPI_Rewrite]
#已配置了伪静态的可以删除
CacheClockRate 3600
RepeatLimit 32
#拟静态:目录形式
RewriteRule ^(.*)/(post|record|sort|author|page)/([0-9]+)$ $1/index.php\?$2=$3
RewriteRule ^(.*)/tag/(.+)$ $1/index.php\?tag=$2
#拟静态:html形式
RewriteRule ^(.*)/(post|record|sort|author|page)-([0-9]+)\.html$ $1/index.php\?$2=$3
RewriteRule ^(.*)/tag-(.+)\.html$ $1/index.php\?tag=$2
将 httpd.ini 置于网站根目录下即可。具体意思看注释,了解正则的话很容易理解!
0
上一篇:PHP验证码类代码( 最新修改,完全定制化! ) 下一篇:php 字符编码转换