详细方法:
1<br/>
rewrite规则如下:
1<br/>
1<br/>
<IfModule mod_rewrite.c>
1<br/>
RewriteEngine On
1<br/>
RewriteRule ^/forumdisplay_([0-9]+).html $ /forumdisplay.php?fid= $1 [L]
1<br/>
RewriteRule ^/forumdisplay_([0-9]+)_([0-9]+).html $ /forumdisplay.php?fid= $1&page= $2 [L]
1<br/>
RewriteRule ^/forumdisplay_digest_([0-9]+).html $ /forumdisplay.php?fid= $1&filter=digest [L]
1<br/>
RewriteRule ^/forumdisplay_([0-9]+)sid(.+).html $ /forumdisplay.php?fid= $1&sid= $2 [L]
1<br/>
RewriteRule ^/forumdisplay_digest_([0-9]+)sid(.+).html $ /forumdisplay.php?fid= $1&sid= $2&filter=digest [L]
1<br/>
RewriteRule ^/viewthread_([0-9]+).html $ /viewthread.php?tid= $1 [L]
1<br/>
RewriteRule ^/viewthread_([0-9]+)sid(.+).html $ /viewthread.php?tid= $1&sid= $2 [L]
1<br/>
RewriteRule ^/viewthread_([0-9]+)_([0-9]+).html $ /viewthread.php?tid= $1&page= $2 [L]
1<br/>
RewriteRule ^/viewthread_([0-9]+)fpage([0-9]+).html $ /viewthread.php?tid= $1&fpage= $2 [L]
1<br/>
RewriteRule ^/viewthread_([0-9]+)_([0-9]+)fpage([0-9]+).html $ /viewthread.php?tid= $1&page= $2&fpage= $3 [L]
1<br/>
RewriteRule ^/viewthread_([0-9]+)_([0-9]+)sid(.+).html $ /viewthread.php?tid= $1&page= $2&sid= $3 [L]
1<br/>
RewriteRule ^/index_([0-9]+).html $ /index.php?gid= $1 [L]
1<br/>
RewriteRule ^/index_([0-9]+)sid(.+).html $ /index.php?gid= $1&sid= $2 [L]
1<br/>
RewriteRule ^/(.+)sid(.+).html $ / $1.php?sid= $2 [L]
1<br/>
RewriteRule /(.+).html $ / $1.php [L]
1<br/>
RewriteCond %{ HTTP_REFERER } !^
1<a href="http://./" target="_blank"><font color="#003366">http://.</font></a>
.shunz.net/. $ [NC]
1<br/>
RewriteRule ^/attach/(.*) $
1<a href="http://bbs.andsky.com/" target="_blank"><font color="#003366">http://bbs.andsky.com/</font></a>
[R=301,L]
1<br/>
</IfModule>
1<br/>