今天在IXwebhosting主机上安装discuz论坛,开启伪静态后,发现并不能成功,显示的是404错误页面。原来IXwebhosting不能像支持wordpress伪静态一样支持discuz,在wordpress里,只要后台设置永久链接就可以了。而discuz不行,现在只能用.htaccess文件完成了。
我在网上找了规则,上传到根目录就可以使用了,下面是.htaccess伪静态规则:
RewriteEngine On
RewriteBase /
RewriteRule ^archiver/((fid|tid)-[w-]+.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 ^space-(username|uid)-(.+).html$ space.PHP?$1=$2
RewriteRule ^tag-(.+).html$ tag.PHP?name=$1
RewriteBase /
RewriteRule ^archiver/((fid|tid)-[w-]+.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 ^space-(username|uid)-(.+).html$ space.PHP?$1=$2
RewriteRule ^tag-(.+).html$ tag.PHP?name=$1
来自:www.Gonten.com
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。