此法只适应能编辑使用.htaccess文件的虚拟主机用户。
discuz6.1论坛 以下静态化都正常,
主题列表页面(forumdisplay.php)静态化
主题内容页面(viewthread.php)静态化
个人资料页面(space.php)静态化
Discuz! Archiver 静态化
但是tag url静态化确出现错误:
“标签页面(tag.php)静态化”选择后的出现无法链接404页面,
解决方法:
您可以在.htaccess文件中加入
RewriteRule ^tag-(.+)\.html$ tag.php?name=$1
我的.htaccess文件,大家可以参考:
RewriteEngine On
RewriteRule ^archiver/([a-z0-9\-]+\.html)$ archiver/index.php?$1
RewriteRule ^forum-([0-9]+)-([0-9]+)\.html$ forumdisplay.php?fid=$1&page=$2
RewriteRule ^thread-([0-9]+)-([0-9]+)-([0-9]+)\.html$ viewthread.php?tid=$1&extra=page\%3D$3&page=$2
RewriteRule ^profile-(username|uid)-(.+)\.html$ viewpro.php?$1=$2
RewriteRule ^space-(username|uid)-(.+)\.html$ space.php?$1=$2
RewriteRule ^tag-(.+)\.html$ tag.php?name=$1
Discuz6.1 URL静态化的使用,官方详细介绍:
http://www.discuz.net/usersguide/advanced_urlrewrite.htm#title
0 条评论 发表评论