oldghost 发表于 2011-11-10 11:13:07

发一个测试过可用的Discuz X2的apache伪静态文件

昨天装了军哥的lnmpa,折腾了好久,终于把Discuz X2架好了,过程可谓有点曲折啊。
原来和lnmp还是有不少区别滴,现在把我调试好确定可用的apache的伪静态文件发出来,有需要的拿去。

oldghost 发表于 2011-11-10 11:14:04

把代码贴出来好了。。。。
RewriteEngine On

RewriteBase /

RewriteCond %{QUERY_STRING} ^(.*)$
RewriteRule ^topic-(.+)\.html$ portal.php?mod=topic&topic=$1&%1
RewriteCond %{QUERY_STRING} ^(.*)$
RewriteRule ^article-(+)-(+)\.html$ portal.php?mod=view&aid=$1&page=$2&%1
RewriteCond %{QUERY_STRING} ^(.*)$
RewriteRule ^forum-(\w+)-(+)\.html$ forum.php?mod=forumdisplay&fid=$1&page=$2&%1
RewriteCond %{QUERY_STRING} ^(.*)$
RewriteRule ^thread-(+)-(+)-(+)\.html$ forum.php?mod=viewthread&tid=$1&extra=page\%3D$3&page=$2&%1
RewriteCond %{QUERY_STRING} ^(.*)$
RewriteRule ^group-(+)-(+)\.html$ forum.php?mod=group&fid=$1&page=$2&%1
RewriteCond %{QUERY_STRING} ^(.*)$
RewriteRule ^space-(username|uid)-(.+)\.html$ home.php?mod=space&$1=$2&%1
RewriteCond %{QUERY_STRING} ^(.*)$
RewriteRule ^blog-(+)-(+)\.html$ home.php?mod=space&uid=$1&do=blog&id=$2&%1
RewriteCond %{QUERY_STRING} ^(.*)$
RewriteRule ^archiver/(fid|tid)-(+)\.html$ archiver/index.php?action=$1&value=$2&%1
RewriteCond %{QUERY_STRING} ^(.*)$
RewriteRule ^(+)-(.+)\.html$ $1.php?rewrite=$2&%1

carlgreat 发表于 2011-12-20 17:57:11

另外,除了这个文件外,另外还需要做什么设置呢?

windme 发表于 2011-12-20 19:37:35

后台就有伪静态的配置文件啊

thinkfor 发表于 2011-12-25 11:37:47

.htaccess文件 放到DX根目录。

配置文集需修改那里啊?

lnmpa 环境

[ 本帖最后由 thinkfor 于 2011-12-25 11:39 编辑 ]

myamo 发表于 2012-2-8 19:06:44

谢谢,测试可用。lnmpa环境

acalbert 发表于 2012-2-9 00:55:39

回复 2# 的帖子

标记~~~~~
页: [1]
查看完整版本: 发一个测试过可用的Discuz X2的apache伪静态文件