Ruclinux 发表于 2016-4-7 02:04:03

为什么我的伪静态规则不起作用呢?

两个discuz 一个6.0 一个3.2 只有论坛,没有其他功能

我的伪静态规则是在 httpd.conf 里 添加在里面的.

# BEGIN WordPress

RewriteEngine On
RewriteRule ^index\.php$ -
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php

# END WordPress
# BEGIN Discuz! X3.2

RewriteEngine On
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

# END Discuz! X3.2
# BEGIN Discuz! 6.0

RewriteEngine On
RewriteRule ^archiver/((fid|tid)-[\w\-]+\.html)$ archiver/index.php?$1
RewriteRule ^forum-(+)-(+)\.html$ forumdisplay.php?fid=$1&page=$2
RewriteRule ^thread-(+)-(+)-(+)\.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
RewriteCond %{REQUEST_METHOD} ^TRACE
RewriteRule .* -

# END Discuz! 6.0

请问这有什么问题吗? 现在论坛能打开首页,但一打开贴子或版块就404 谢谢了

Ruclinux 发表于 2016-4-9 00:33:51

大家帮我看一看,是不是我这伪静态规则有问题呀,谢谢了.

Ruclinux 发表于 2016-4-16 18:17:00

折腾了十多天,问题解决了,Ecvps那赵家人累我不浅

youth 发表于 2016-4-16 18:18:03

楼下帮你解决

micto 发表于 2016-4-16 18:33:30


008.gif
Apache不是可以用.htaccess吗?Wordpress和Discuz各自弄个.htaccess文件丢各自的网站根目录不就好了

micto 发表于 2016-4-16 18:34:30


008.gif
另外你看下phpinfo,确认是不是开启url rewrite了。。

micto 发表于 2016-4-16 18:35:43


008.gif
哎,卧槽,已经解决了,害我水了3贴。。。

a1328788808 发表于 2016-4-16 18:50:51

楼主真水。
页: [1]
查看完整版本: 为什么我的伪静态规则不起作用呢?