«

PbootCMS伪静态规则

夸克 发布于 阅读:196


Apache下的规则

<IfModule mod_rewrite.c>
  Options +FollowSymlinks
  RewriteEngine On

  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteCond %{REQUEST_FILENAME} !-f

  RewriteRule ^(.*)$ index.php?p=$1 [QSA,PT,L]
</IfModule>

Nginx下的规则

location / {
     if (!-e $request_filename){
            rewrite ^/index.php(.*)$ /index.php?p=$1 last;
                rewrite ^(.*)$ /index.php?s=$1 last;
     }
}