关于dz3.2开启伪静态
回 1楼dongshan8的帖子
你好,只有一个站点,安装是在百度上找的,论坛地址是www. wordpoc. com
-------------------------
回 4楼dongshan8的帖子
http:// www. cnblogs. com/onlycxue/p/3246124. html 按照这个安装的
root@iZu1389bqiaZ:~# sudo a2enmod rewrite
Module rewrite already enabled
root@iZu1389bqiaZ:~#
-------------------------
回 6楼dongshan8的帖子
好的,我去看看~~~
-------------------------
回 6楼dongshan8的帖子
刚刚把问题解决了,谢谢~~~
按照http://www .blear. cn/784.html
先sudo a2enmod rewrite ubuntu 14.04修改的文件内容在/etc/apache2/apache2.conf
AllowOverride None(修改为AllowOverride All)
Options FollowSymLinks AllowOverride All Require all denied
然后
1.在后台“全局》SEO设置》URL 静态化”相关复选框全部勾选,点“提交”按钮。2.在论坛目录下建立.htaccess文件。文件内容如下 RewriteBase /discuz中的discuz为目录,因为我的都在跟目录所以是RewriteBase / RewriteEngine On RewriteBase /discuz RewriteCond %{QUERY_STRING} ^(.*)$ RewriteRule ^topic-(.+)\.html$ portal.php?mod=topic&topic=$1&%1 RewriteCond %{QUERY_STRING} ^(.*)$ RewriteRule ^article-([0-9]+)-([0-9]+)\.html$ portal.php?mod=view&aid=$1&page=$2&%1 RewriteCond %{QUERY_STRING} ^(.*)$ RewriteRule ^forum-(\w+)-([0-9]+)\.html$ forum.php?mod=forumdisplay&fid=$1&page=$2&%1 RewriteCond %{QUERY_STRING} ^(.*)$ RewriteRule ^thread-([0-9]+)-([0-9]+)-([0-9]+)\.html$ forum.php?mod=viewthread&tid=$1&extra=page\%3D$3&page=$2&%1 RewriteCond %{QUERY_STRING} ^(.*)$ RewriteRule ^group-([0-9]+)-([0-9]+)\.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-([0-9]+)-([0-9]+)\.html$ home.php?mod=space&uid=$1&do=blog&id=$2&%1 RewriteCond %{QUERY_STRING} ^(.*)$ RewriteRule ^archiver/(fid|tid)-([0-9]+)\.html$ archiver/index.php?action=$1&value=$2&%1 RewriteCond %{QUERY_STRING} ^(.*)$ RewriteRule ^([a-z]+[a-z0-9_]*)-([a-z0-9_\-]+)\.html$ plugin.php?id=$1:$2&%1
最后重启Apache
sudo /etc/init.d/apache2 restart
赞0
踩0