首先在后台插件管理中开启【静态管理中心】,然后进入管理保存伪静态的运行方式。
IIS6 保存一下代码为 httpd.ini 到网站根目录,自动生效。
[ISAPI_Rewrite]
RewriteRule /page_([0-9]*)\.html /index\.php\?page=$1&rewrite=1&full_uri=$0 [I,L]
RewriteRule /date-([0-9\-]+)(?:_)?([0-9]*)\.html /index\.php\?date=$1&page=$2&rewrite=1&full_uri=$0 [I,L]
RewriteRule /author-([0-9]+)(?:_)?([0-9]*)\.html /index\.php\?auth=$1&page=$2&rewrite=1&full_uri=$0 [I,L]
RewriteRule /tags-([0-9]+)(?:_)?([0-9]*)\.html /index\.php\?tags=$1&page=$2&rewrite=1&full_uri=$0 [I,L]
RewriteRule /category-([0-9]+)(?:_)?([0-9]*)\.html /index\.php\?cate=$1&page=$2&rewrite=1&full_uri=$0 [I,L]
RewriteRule /post/([0-9]+)\.html(\?.*)? /index\.php\?id=$1&rewrite=1&full_uri=$0 [I,L]
RewriteRule /([0-9]+)\.html(\?.*)? /index\.php\?id=$1&rewrite=1&full_uri=$0 [I,L]
IIS7保存代码为 web.config 到网站根目录,自动生效。 |