1 WEBAPACHE,ôϲ,REWRITEԶ


2 WEBNGINX,ҲԶ,data/nginx.rewrite.txt ,ֶӵnginxļ

3 ķIIS, ǱǸ,  1 Ĺдһ, Ҳܼ 





APACHEļΪ.htaccess =>Զ
##############################################################
#ҳ:#site#nav/index.html
#ҳ:#site#nav/#id.html
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
#
RewriteRule ([a-zA-Z0-9\_\/\!\-]+)/index.html  index.php?n=$1 [L]
#ҳ
RewriteRule ([a-zA-Z0-9\_\/\!\-]+)/(\d+).html  index.php?n=$1&id=$2 [L]
</IfModule>
	

NGINXļ
##############################################################

#
rewrite ^/#site([a-zA-Z0-9\_\/\!\-]+)/index.html$  /index.php?n=$1 last;
#ҳ
rewrite ^/#site([a-zA-Z0-9\_\/\!\-]+)/(\d+).html$  /index.php?n=$1&id=$2 last;




IISļΪ.htaccess
##############################################################

[ISAPI_Rewrite]

# 3600 = 1 hour
CacheClockRate 10

RepeatLimit 32

# Protect httpd.ini and httpd.parse.errors files
# from accessing through HTTP
#others
#RewriteRule ^$ /mem.\php\?q=index

#
RewriteRule ([a-zA-Z0-9\_\/\!\-]+)/index\.html  /index\.php?n=$1
#ҳ
RewriteRule ([a-zA-Z0-9\_\/\!\-]+)/(\d+)\.html  /index\.php?n=$1&id=$2