[ISAPI_Rewrite]
RewriteRule ^/admin(.*) /admin/$1 [L]
RewriteRule ^/(.*)(html|htm)$ /index.php/$1$2 [L]
RewriteRule ^([^.]+)$ /index.php/$1 [L]

说明一下
第一条 重定向后台地址
第二条 将带html htm 后缀的重写
第三条 排除带”.”的 其余的全部重写
缺点:
使用像 google网站管理员 通过html文件来验证的时候麻烦一点
得在前面添加一条
RewriteRule /google26f74facfee37a5d.html $0 [L]

原创文章,转载请注明: 转载自贝壳博客

本文链接地址: typecho IIS rewrite 规则

location / {
        index  index.html index.htm index.php;

        if (-f $request_filename/index.html){
            rewrite (.*) $1/index.html break;
        }
        if (-f $request_filename/index.php){
            rewrite (.*) $1/index.php;
        }
        if (!-f $request_filename){
            rewrite (.*) /index.php;
        }

    }

原创文章,转载请注明: 转载自贝壳博客

本文链接地址: typecho Nginx rewrite 规则