﻿IIS的伪静态规则:

[ISAPI_Rewrite]
# 3600 = 1 hour
CacheClockRate 3600
RepeatLimit 32
RewriteRule ^/index.html index.php [L]
RewriteRule ^/news_show/(\d+)$ /index.php\?ac=news_show&id=$1 [L]
RewriteRule ^/news_list$ /index.php\?ac=news_list [L]
RewriteRule ^/news_list/page/(\d+)$ /index.php\?ac=news_list&page=$1 [L]
RewriteRule ^/news_list/(\d+)$ /index.php\?ac=news_list&classid=$1 [L]
RewriteRule ^/news_list/(\d+)/(\d+)$ /index.php\?ac=news_list&classid=$1&page=$2 [L]
RewriteRule ^/picture_show/(\d+)$ /index.php\?ac=picture_show&id=$1 [L]RewriteRule ^/picture_list$ /index.php\?ac=picture_list [L]
RewriteRule ^/picture_list/page/(\d+)$ /index.php\?ac=picture_list&page=$1 [L]
RewriteRule ^/picture_list/(\d+)$ /index.php\?ac=picture_list&classid=$1 [L]
RewriteRule ^/picture_list/(\d+)/(\d+)$ /index.php\?ac=picture_list&classid=$1&page=$2 [L]
RewriteRule ^/about_list$ /index.php\?ac=about_list [L]
RewriteRule ^/about_show/(\d+)$ /index.php\?ac=about_show&id=$1 [L]
RewriteRule ^/bulletin_show/(\d+)$ /index.php\?ac=bulletin_show&id=$1 [L]

Nginx的伪静态规则:

rewrite ^index.php$  index.html;
rewrite ^(.*)news_show/([0-9]+)$ $1/index.php?ac=news_show&id=$2;
rewrite ^(.*)news_list$ index.php?ac=news_list;
rewrite ^(.*)news_list/page/([0-9]+)$ $1/index.php?ac=news_list&page=$2;
rewrite ^(.*)news_list/([0-9]+)$ $1/index.php?ac=news_list&classid=$2;
rewrite ^(.*)news_list/([0-9]+)/([0-9]+)$ $1/index.php?ac=news_list&classid=$2&page=$3;
rewrite ^(.*)picture_show/([0-9]+)$ $1/index.php?ac=picture_show&id=$2;
rewrite ^(.*)picture_list$ index.php?ac=picture_list;
rewrite ^(.*)picture_list/page/([0-9]+)$ $1/index.php?ac=picture_list&page=$2;
rewrite ^(.*)picture_list/([0-9]+)$ $1/index.php?ac=picture_list&classid=$2;
rewrite ^(.*)picture_list/([0-9]+)/([0-9]+)$ $1/index.php?ac=picture_list&classid=$2&page=$3;
rewrite ^(.*)about_list$ index.php?ac=about_list;
rewrite ^(.*)about_show/([0-9]+)$ $1/index.php?ac=about_show&id=$2;
rewrite ^(.*)bulletin_show/([0-9]+)$ $1/index.php?ac=bulletin_show&id=$2;

Apache的伪静态规则:

RewriteEngine On
RewriteBase   /
RewriteRule ^index.html index.php

RewriteRule ^news_show/(\d+)$ index.php?ac=news_show&id=$1
RewriteRule ^news_list$ index.php?ac=news_list
RewriteRule ^news_list/page/(\d+)$ index.php?ac=news_list&page=$1
RewriteRule ^news_list/(\d+)$ index.php?ac=news_list&classid=$1
RewriteRule ^news_list/(\d+)/(\d+)$ index.php?ac=news_list&classid=$1&page=$2

RewriteRule ^picture_show/(\d+)$ index.php?ac=picture_show&id=$1
RewriteRule ^picture_list$ index.php?ac=picture_list
RewriteRule ^picture_list/page/(\d+)$ index.php?ac=picture_list&page=$1
RewriteRule ^picture_list/(\d+)$ index.php?ac=picture_list&classid=$1
RewriteRule ^picture_list/(\d+)/(\d+)$ index.php?ac=picture_list&classid=$1&page=$2

RewriteRule ^about_list$ index.php?ac=about_list
RewriteRule ^about_show/(\d+)$ index.php?ac=about_show&id=$1
RewriteRule ^bulletin_show/(\d+)$ index.php?ac=bulletin_show&id=$1