Perform 301 redirection for redirect. php

Source: Internet
Author: User

Similar to redirect. php? Tid1_7&goto=lastpostthe child content of the URL is the same as that of thread-1-1.html, but the URL format is different. Se will be treated as a duplicate content.
This URL format will appear in the last post or last reply position of the home page or forum list page. The previous topic and next topic of the previous discuz7 versions are also such URLs, but the parameters can be found in the Code.

Why not disable this URL-based index?
?
1. The main reason is that you cannot control other people's links to this form. If you disable the index form, the URL will waste the link, so you need to perform a 301 jump and transfer the link and weight to the standard static form.
2. The link format appears on the home page. You may be able to speed up recording if it is not prohibited.

Perform 301 redirection for redirdbms. php

In some cases, the program can only find the TID to be displayed. Therefore, you can only modify the program and use PHP code to achieve 301 redirection.
.
Open the Redirect. php file and replace require_once discuz_root. './viewthread. php'

Header ("HTTP/1.1 301 moved permanently ");
Header ("Location: thread-00000000tid0000-00000000page0000-1.html ");
In this way, the jump will not be lost.

There are three parts in the file. After all the modifications are completed, you can access the Forum and check the effect.

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.