新建一个文本文件,将下列代码复制进去,把文件重命名为:.htaccess(只有后缀名,没有文件名,可能在WINDOWS下无法重命名,可以先上传,再利用FTP软件来重命名),然后将此文件上传到论坛根目录,把CONN.ASP文件中的Const IsUrlreWrite = 0修改为Const IsUrlreWrite = 1就可以了。 注:你的空间一定要支持伪静态才行。否则就不要折腾了。
RewriteEngine On
#论坛目录
RewriteBase /bbs
# 重写index.asp
RewriteRule ^index_(\d+)_(.*)_(\d+)_(\d+)\.html$ index.asp?boardid=$1&action=$2&topicmode=$3&page=$4 [N,I]
RewriteRule ^index_(\d+)_(\d+)_(.*)\.html$ index.asp?boardid=$1&page=$2&action=$3 [N,I]
RewriteRule ^index_(\d+)_(\d+)\.html$ index.asp?boardid=$1&topicmode=$2 [N,I]
RewriteRule ^index_(\d+)_(\d+)_\.html$ index.asp?boardid=$1&page=$2 [N,I]
RewriteRule ^index_(\d+)\.html$ index.asp?boardid=$1 [N,I]
RewriteRule ^index\.html$ index.asp [N,I]
RewriteRule ^index_(\d+)__(\d+)_(\d+)__(\d+)\.html$ index.asp?boardid=$1&TopicMode=$3&List_Type=&Page=$4
# 重写dispbbs.asp
RewriteRule ^dispbbs_(\d+)_(\d+)_(\d+)_skin(\d+)_(\d+)_(\d+)\.html$ dispbbs.asp?boardid=$1&replyid=$2&id=$3&skin=$4&page=$5&star=$6 [N,I] RewriteRule ^dispbbs_(\d+)_(\d+)_(\d+)_skin(\d+)_(\d+)\.html$ dispbbs.asp?boardid=$1&replyid=$2&id=$3&skin=$4&star=$5 [N,I]
RewriteRule ^dispbbs_(\d+)_(\d+)_(\d+)_skin(\d+)\.html$ dispbbs.asp?boardID=$1&replyid=$2&ID=$3&skin=$4 [N,I]
RewriteRule ^dispbbs_(\d+)_(\d+)_(\d+)\.html$ dispbbs.asp?boardID=$1&ID=$2&page=$3 [N,I]
RewriteRule ^dispbbs_(\d+)_(\d+)\.html$ dispbbs.asp?boardID=$1&ID=$2 [N,I]
RewriteRule ^dispbbs_(\d+)_(\d+)_(\d+)_(\d+)\.html$ dispbbs.asp?boardID=$1&ID=$2&star=$3&page=$4 [N,I]
RewriteRule ^dispbbs_(\d+)_(\d*)_(\d*)_(\w+)\.html$ dispbbs.asp?boardID=$1&ID=$2&page=$3&move=$4 [N,I
RewriteRule ^dispbbs_(\d+)_(\d+)_(\d+)_pre.html$ dispbbs.asp?boardid=$1&id=$2&page=$3&move=pre
RewriteRule ^dispbbs_(\d+)_(\d+)_(\d+)_next.html$ dispbbs.asp?boardid=$1&id=$2&page=$3&move=next
|