以下內容属于 ‘phpbb’ 便签:

PHPBB论坛伪静态规则写法

不知道使用PHPbb的人多否,前几天折腾一个论坛,用了BB,于是找了下bb的伪静态,发现不是很多~ 仅有的几个看了下生产日期,发现过期了…… 为此iFans收集了强人的杰作~ 只需要改这四个文件: 1、viewtopic.php 2、viewtopic.php 3、includes/functions_display.php 4、includes/functions.php 分页规则:viewforum-1-0.html -> viewform.php?f=1&start=1 版面两个参数版面id 和分页参数 viewtopic-1-1-1.html -> viewtopic?f=1&t=1&start=1 版面id 帖子id 分页参数 按照规则,在.htaccess里加上下面的代码: RewriteEngine on #phpbb重写规则 RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^viewtopic-(.+)-(.+)-(.+).html$ viewtopic.php?f=$1&t=$2&start=$3 [L,NC] RewriteRule ^viewforum-(.+)-(.+).html$ viewforum.php?f=$1&start=$2 [L,NC] 打开viewtopic.php 649行:’U_VIEW_FORUM’ => append_sid(“{$phpbb_root_path}viewforum.$phpEx”, ‘f=’ . $forum_id), 改为: //’U_VIEW_FORUM’ => append_sid(“{$phpbb_root_path}viewforum.$phpEx”, ‘f=’ . $forum_id), ‘U_VIEW_FORUM’ => “./viewforum”. ‘-‘ […] (more...)