在程序后台开启静态化设置,将下面的代码保存为 .htaccess 文件,上传到程序根目录!
保存为 .htaccess 文件的方法:
记事本保存代码,然后“另存为”,文件名写.htaccess,保存类型选“所有文件(*.*)”,点"保存"即可。
RewriteEngine On
RewriteBase /
# Rewrite 系统规则请勿修改
RewriteRule ^(.*/)*topic-(.+)\.html$ $1portal.php?mod=topic&topic=$2
RewriteRule ^(.*/)*article-([0-9]+)\.html$ $1portal.php?mod=article&articleid=$2
RewriteRule ^(.*/)*forum-([0-9]+)-([0-9]+)\.html$ $1forum.php?mod=forumdisplay&fid=$2&page=$3
RewriteRule ^(.*/)*thread-([0-9]+)-([0-9]+)-([0-9]+)\.html$ $1forum.php?mod=viewthread&tid=$2&extra=page\%3D$4&page=$3
RewriteRule ^(.*/)*group-([0-9]+)-([0-9]+)\.html$ $1forum.php?mod=group&fid=$2&page=$3
RewriteRule ^(.*/)*space-(username|uid)-(.+)\.html$ $1home.php?mod=space&$2=$3
RewriteRule ^(.*/)*([a-z]+)-(.+)\.html$ $1$2.php?rewrite=$3 |