How to enable the discuz Forum homepage to open without displaying Forum. php

Source: Internet
Author: User


In the literary coffee house, when we use the discuz Forum program, will we find that all URLs end with Forum. php? So how can I remove the homepage Forum. php OF THE discuz forum under the BBS directory? This problem looks very simple. You can find some solutions in the Teaching and Research Section, but it cannot solve my problem. After searching and trying on Baidu, this problem was finally solved this evening. I would like to share some of my methods to supplement the existing methods.

My situation: the environment built on the local machine with comsenzexp, the root directory is http: // 127.0.0.1: 81/install dedecms, the first directory is http: // 127.0.0.1: 81/blog/install zblog, first-level directory http: // 127.0.0.1: 81/BBS/install discuz x2.

First, access http: // 127.0.0.1: 81/BBS/will automatically jump to http: // 127.0.0.1: 81/BBS/Forum. php

Purpose: Access http: // 127.0.0.1: 81/BBS/will open http: // 127.0.0.1: 81/BBS/forum. PHP content, but the URL will not jump to http: // 127.0.0.1: 81/BBS/forum. PHP.

Solution 1:

First, add a forum name before the name of the main navigation forum is renamed in the page-> navigation settings-> browser navigation. The new navigation type is customized, different from the previous Forum type, the previous Forum type is built-in. Select the previous Forum on the homepage, and deselect the available check box. Select/BBS as the link to the new forum and save it. Enter your top-level domain name in global> domain name Settings> application domain name> default, and enter http: // 127.0.0.1: 81/This is the value I set. And try again.

Now, you only need to input http: // 127.0.0.1: 81 // bbs, and no forum is appended. after PHP tail uses this method, use Firefox to open http: // 127.0.0.1: 81/BBS/prompts loop redirection instead of opening the page. Use the sogou browser to open the page, page refresh constantly (it is not ruled out that my operation is not standard, but it cannot solve my problem ). After using this method, http: // 127.0.0.1: 81/BBS/will not jump, but the reality is that http: // 127.0.0.1: 81/BBS/portal. php content.

Solution 2:

Create a file under http: // 127.0.0.1: 81/BBS. htaccess file, which contains directoryindex forum. PHP (start to create a TXT file and change the file name. In XP, you are prompted to enter the file name. htaccess and then use NotePad to open the modified file ). If you enable http: // 127.0.0.1: 81/BBS/again, http: // 127.0.0.1: 81/BBS/forum is enabled. PHP content, but the URL will not jump to http: // 127.0.0.1: 81/BBS/forum. PHP, modified successfully.

Note:

1. Different friends use different solutions in different situations.

2. after the modification is successful, you must also note that the anchor text on the Forum homepage, the Forum homepage, the winner navigation on the content page, and the location navigation has been modified to standardize the URL, determine the address of the Forum homepage, and set the weight. My approach is to further put the forum_viewthread.php, forum_forumdisplay.php, forum_forumdisplay.php, forum_misc.php, and forum_post.php under the/source/module/FORUM/directory (these four files) search for the href = "forum. PHP ", and then rebuild the cache.


The above two methods can be used to remove the Forum. php homepage of the discuz forum under the BBS directory. If you want to remove it, you can try it. I succeeded in the second method.

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.