IIS下不用Rewrite实现wordpress伪静态

原理是利用404错误页面重写URL

程序代码

<?php
$qs = $_SERVER['QUERY_STRING'];
$_SERVER['REQUEST_URI'] = substr($qs, strpos($qs, ':80')+3);
$_SERVER['PATH_INFO'] = $_SERVER['REQUEST_URI'];
include('index.php');
?>

评论 (2)
  1. 沙发
    深圳瑜伽 2009-03-13 04:43

    你好哇!你的博客很漂亮哇!!
    来踩踩喇!
    我是深圳的哟! :-))