首页>云计算大数据

Apache虚拟主机下Discuz!X伪静态Rewrite规则

更新时间:2013-12-24

首先要确定apache开启了Rewrite模块,之后创建.htaccess文件 再将下面的代码加入到文件中即可

RewriteEngine On
RewriteRule ^forum-(\w+)-([0-9]+)\.html$ forum.php?mod=forumdisplay&fid=$1&page=$2
RewriteRule ^thread-([0-9]+)-([0-9]+)-([0-9]+)\.html$ forum.php?mod=viewthread&tid=$1&extra=page\%3D$3&page=$2
RewriteRule ^topic-(.+)\.html$ portal.php?mod=topic&topic=$1
RewriteRule ^article-([0-9]+)\.html$ portal.php?mod=article&articleid=$1
RewriteRule ^group-([0-9]+)-([0-9]+)\.html$ forum.php?mod=group&fid=$1&page=$2
RewriteRule ^space-(username|uid)-(.+)\.html$ home.php?mod=space&$1=$2
RewriteRule ^([a-z]+)-(.+)\.html$ $1.php?rewrite=$2
 

上一篇:许继电气配网自动化公司...

下一篇:2012年金源万博就业火爆,百家用人单位建立新的合作关系!...

金源在线客服

QQ在线咨询

咨询电话
010-83650488

在线咨询

在线咨询

电话咨询