首页 | 源码下载 | 网站模板 | 网页特效 | 广告代码 | 网页素材 | 字体下载 | 书库 | 站长工具
会员投稿 投稿指南 RSS订阅
当前位置:主页>网络编程>PHP教程>资讯:php 实现SEO之伪静态

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 置于网站根目录下即可。具体意思看注释,了解正则的话很容易理解!


上一篇:PHP验证码类代码( 最新修改,完全定制化! ) 下一篇:php 字符编码转换

评论总数:0 [ 查看全部 ] 网友评论


关于我们隐私版权广告服务友情链接联系我们网站地图