Dabr在IIS7的rewrite规则如下:
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="Dabr">
<match url="Dabr目录/(.*)" />
<conditions>
......
方法很简单。新建一个“_chineseuri.php”文件,内容如下:
<?php
// IIS Mod-Rewrite
if (isset($_SERVER['HTTP_X_ORIGINAL_URL'])) {
$_SERVER['REQUEST_URI'] = $_SERVER['HTTP_X_ORIGINAL_URL'];
}
// IIS Isapi_Rewrite
else if (isset($_SERVER['HTTP_X_REWRITE_URL'])) {
$_SERVER['REQ......
IIS7依靠域名判断重定向的Rewrite规则
下面贴一下Rewrite规则,作用是把所有非“blog.creke.net”的内容都301重定向到“blog.creke.net”:
<configuration> <system.webServer> <rewrite> <rules> ......