youBBS安装vps rewrit版本后,除首页全部404错误的解决办法
youbbs是一个很简洁方便的轻论坛程序,官方说是借鉴了v2ex,本人一直很喜欢这样的风格,所以今天就安装试了一下。
大致步骤,https://code.google.com/p/youbbs/downloads/list 下载vps rewrite 版youbbs
然后进解压包配置好config.php文件【数据库账号 密码 名称 端口(端口默认的可以不改)】,上传,然后www.domain.com/install.php即可安装成功【www.domain.com填写你自己的域名】
第一个注册的账号默认为管理员账号。
但是呢,我遇到了这样的问题,安装好后,除了首页,其他的页面均404,后来发现是rewrite规则没有写好【.htaccess 或者.conf】
404错误只针对少数人【如我这种装AMH只支持.conf不支持.htaccess的,一般人开rewrite,youbbs自带有.htaccess,正常是不会出现404的】
于是找了一下,用以下的规则,可以完美解决404问题:
rewrite ^/n-([0-9]+)(-([0-9]*))?$ /nodepage.php?cid=$1&page=$3 last;
rewrite ^/t-([0-9]+)(-([0-9]*))?$ /topicpage.php?tid=$1&page=$3 last;
rewrite ^/notifications$ /notifications.php last;
rewrite ^/feed$ /feed.php last;
rewrite ^/forgot$ /forgot.php last;
rewrite ^/upload-(650|590)$ /upload.php?mw=$1 last;
rewrite ^/viewat-(desktop|mobile)$ /viewat.php?via=$1 last;
rewrite ^/goto-t-([0-9]+)$ /gototopic.php?tid=$1 last;
rewrite ^/member/(.+)$ /member.php?mid=$1 last;
rewrite ^/newpost/([0-9]+)$ /newpost.php?cid=$1 last;
rewrite ^/admin-edit-post-([0-9]+)$ /admin-edit-post.php?tid=$1 last;
rewrite ^/admin-edit-comment-([0-9]+)$ /admin-edit-comment.php?rid=$1 last;
rewrite ^/admin-setuser-([0-9]+)$ /admin-setuser.php?mid=$1 last;
rewrite ^/admin-node(-([0-9]*))?$ /admin-node.php?nid=$2 last;
rewrite ^/admin-setting$ /admin-setting.php last;
rewrite ^/admin-user-([a-z]+)(-([0-9]*))?$ /admin-user.php?act=$1&mid=$3 last;
rewrite ^/admin-link-([a-z]+)(-([0-9]*))?$ /admin-link.php?act=$1&lid=$3 last;
rewrite ^/(login|sigin|logout|forgot|setting|install)$ /$1.php last;
rewrite ^/.*?templates /404.html last;
rewrite ^/.*?avatar/$ /404.html last;
rewrite ^/upload/([0-9]+/)?$ /404.html last;
rewrite ^/.*?avatar/(large|normal|mini)/$ /404.html last;
rewrite ^/favorites$ /favorites.php last;
大功告成~
这界面倒是挺有爱的,做个问答倒也挺不错的~
问答有问答的程序。。。不过这个做个内部交流论坛蛮好的~
挺不错的问答程序
这个是论坛,不是问答程序!
关注过。不知道拿来干嘛~
内部论坛是最好的选择~
youBBS,好多的论坛程序啊
………不玩论坛….论坛不好玩……..
有点像问答。
我倒觉得有的像vinilla
代码质量方面没有 bbPress 高,功能没有 Discuz 全,用它干什么?
用不惯bbpress
想不起来怎么用
不错不错