The most complete discuz! X2 method of removing forum.php tail

Source: Internet
Author: User
Keywords Discuz

Intermediary transaction SEO diagnosis Taobao guest Cloud host technology Hall

First of all: this is a removal of the Discuz forum forum.php Tail The most complete method, has seen similar articles before, but follow the steps, you will find that there are many places did not remove the forum.php tail. This is not conducive to site SEO. Today, SEM Institute for Everyone to organize the most perfect way to remove the forum.php tail.

Before we do this, let's take a look at the place where the Discuz forum contains forum.php tails:

(1) The Forum button in the main navigation

  

(2) home page of the forum breadcrumbs Navigation location

(3) The location of breadcrumbs in the zoning plates

(4) The breadcrumbs location of the topic list page

(5) The breadcrumb location of the theme content page

  

(6) New topic page breadcrumbs Navigation location

(7) 2 return buttons for the topic list page

  

(8) Archiver/'s homepage

  

(9) Enter the domain name by default jump to with www. Domain name com/forum.php

Now that you know, the Discuz forum is where there are forum.php, then follow these steps to remove each

(1) Setting the domain name in the background

  

After this step setting, the main navigation of the Forum button is removed forum.php tail

(2) Find discuz.htm in the Template\default\forum, about the position of line 19th

<a href= "forum.php" > Modified to: <a href= "http://$_g[' setting ' [' Domain '] [' app '] [' Forum ']/'] >

In this way, the forum.php on the home page and the breadcrumbs in the zoning section are removed.

(3) in/source/module/forum/

forum_forumdisplay.php, 65th, 67, 74, 76 lines: <a href= "forum.php" > Modified to: <a href= "./" > (Remove topic list page breadcrumbs navigation position forum.php tail)

forum_viewthread.php, line 107th: <a href= "forum.php" > Modified to: <a href= "./" > (Remove Theme content page breadcrumbs navigation position forum.php tail)

forum_post.php, line 111th: <a href= "forum.php" > Modified to: <a href= "./" > (remove Theme hair theme crumbs navigation location forum.php tail)

forum_misc.php, No. 394, line 398: <a href= "forum.php" > Modified to: <a href= "./" > (This should be mobile version)

(4)/template/default/forum/

Forumdisplay.htm, line 159th: Change <a href= "forum.php" > To: <a href= "http://$_g[' setting ' [' Domain '] [' app '] [' forum '] ]/> (Remove the forum.php tail from the back button at the top of the topic list page)

Forumdisplay_list.htm, line No. 332: Change <a href= "forum.php" > To: <a href= "http://$_g[' setting ' [' Domain '] [' app '] ['] Forum ']/' > (Remove the forum.php tail in the back button in front of the pager at the bottom of the topic list page)

(5) in/source/archiver/forum/

Discuz.php's 24th line, put <a href= ". /forum.php "target=" _blank "> Modified to <a href=". /"target=" _blank >

(6) Set 301 redirect

Rewriteengine on

Rewritecond%{http_host} ^ (. +) \. Domain name COM [NC]

Rewriterule ^ (. *) $ http://www. domain name. com [l,r=301]

Rewriterule ^ (. *) \/forum.php$ http://www. domain name. com [l,r=301]

Through the above six operations, you can perfectly remove the Disciz forum forum.php tail. The purpose of this is to make the website URL standardized, conducive to site optimization.

This paper is the first SEM college: http://www.semxyz.com

Copyright, reproduced please link to the form of the author and the original source.

Related Article

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.