Discuz URL pseudo-static Forum directory and sub-directory

Source: Internet
Author: User

First

Open function_core.php under source \ Function

Find the following code:

if($type == ‘forum_forumdisplay‘) {        list(,,, $fid, $page, $extra) = func_get_args();        $r = array(            ‘{fid}‘ => empty($_G[‘setting‘][‘forumkeys‘][$fid]) ? $fid : $_G[‘setting‘][‘forumkeys‘][$fid],            ‘{page}‘ => $page ? $page : 1,        );    } elseif($type == ‘forum_viewthread‘) {        list(,,, $tid, $page, $prevpage, $extra) = func_get_args();        $r = array(            ‘{tid}‘ => $tid,            ‘{page}‘ => $page ? $page : 1,            ‘{prevpage}‘ => $prevpage && !IS_ROBOT ? $prevpage : 1,        );

 

Modify:

if($type == ‘forum_forumdisplay‘) {        list(,,, $fid, $page, $extra) = func_get_args();        $r = array(            ‘{fid}‘ => empty($_G[‘setting‘][‘forumkeys‘][$fid]) ? $fid : $_G[‘setting‘][‘forumkeys‘][$fid],            ‘{page}‘ => $page ,        );    } elseif($type == ‘forum_viewthread‘) {                list(,,, $tid, $page, $prevpage, $extra) = func_get_args();        $fid = DB::result_first("SELECT fid FROM ".DB::table(‘forum_thread‘)." WHERE tid = ‘$tid‘");        $r = array(            ‘{fid}‘ => empty($_G[‘setting‘][‘forumkeys‘][$fid]) ? $fid : $_G[‘setting‘][‘forumkeys‘][$fid],            ‘{tid}‘ => $tid,            ‘{page}‘ => $page ,            ‘{prevpage}‘ => $prevpage && !IS_ROBOT ? $prevpage : 1,        );

Go to the website and choose '''seo settings **> "static URL ".

In the format of "forum topic list page", enter {FID}/{page}

Enter {FID}/m {TID}/{page} in the format of "forum topic content page}

 

Download the. htaccess file and upload it to the root directory of the website.

Http://pan.baidu.com/s/1mg3HLsk

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.