About WordPress 3.1 Upgrade after the home page cannot open the reason

Source: Internet
Author: User
Tags include php file
About WordPress 3.1 Upgrade to homepage redirect Cycle reason may be: wp-include/template-loader.php file head of the following code caused.

About WordPress 3.1 Upgrade to homepage redirect Cycle reason may be: wp-include/template-loader.php file Head of the following code caused.

if (defined (%u2018wp_use_themes%u2019) && wp_use_themes)
do_action (%u2018template_redirect%u2019);

The solution is to delete this section of the code, the home page can be normal access.

About 3.1 redirects:
Why does WordPress want to be on the code so that all pages make a template judgment jump? Turn off WordPress homepage URL redirection gives the answer, is WordPress for a page there are multiple URLs SEO optimization. Like what

http://**.net
http://**.net/index.php
http://www.**.net
http://www.**.net/index.php

The above several URLs are pointing to the blog home page, but for the search engine is the existence of the same page content of multiple URLs, not conducive to SEO. So WordPress introduced the canonical URL redirection technology, to redirect multiple URLs to one of the Web site, is the above see the function of the code. The actual code that works is located in the redirect_canonical () function of wp-includes/canonical.php, and interested students can study it carefully.



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.