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');
?>

Share

小 虾

哦也,我是小虾

You may also like...

2 Responses

  1. 深圳瑜伽 says:

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

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.