Reprinted from: http://www.budeyan.com/tech_notes/wordpress3-1-cuowu/
Without saying a new idea, I simply deleted the old village chief's blog, which had been stuck for three years because of no longer taking care of it. When I was about to use this domain name and use my friend's help to "Expand the macro Chart", I did not expect the teacher to die first, the word is not horizontal, but there was a problem that the second Monk was puzzled.
As you are familiar with WordPress blogs, the WYSIWYG editor is the best choice for the platform. However, an error occurred while installing wordpress3.1. The background operations, databases, and other operations are normal. The homepage ie cannot be opened, and a circular redirection error is prompted in Firefox.
For example, when the domain name is opened in Firefox, the following error occurs after dozens of seconds. I tried to clear the cookie, restart IIS, and reinstall wordpress3.1.
- The page redirection is incorrect.
- Firefox detects that the server is redirecting requests from this address cyclically.
- This problem may be caused by disabling or rejecting cookies.
Wordpress3.1 loop redirection error Conjecture
I came up with a question. When you open a Wordpress blog,ProgramChecks whether the wp-config.php file exists. If yes, you will try to call the database according to the configuration file, and display the website -- exclude other factors. This means the website can be opened normally. If not, you will be redirected to the installation prompt page. After the installation is complete, you can access the database normally.
My question: it is very likely that the problem occurs here. Does WordPress set a parameter X to determine whether the installation is complete. If the value is 1, it indicates that it has been installed. If the value is 0, it indicates that it is not installed or you need to reinstall it for other reasons. The default value of X is 0. After successful installation, X is changed to 1. At the same time, the installation page settings are redirected to the home page.
The problem arises. If 0 fails to change to 1 (for example, due to a file write error), the system jumps to the installation page to prompt the user to install it ,, however, the installation page is set to jump to the home page. So you pushed it to me and I pushed it to you. In this round-trip, Firefox was impatient and annoyed, and gave the user a circular redirection error message.
Unfortunately, I cannot determine whether this method is true or not.-- By comparing successfully installed blog files, I have not been able to turn conjecture into reality. The following documents cannot be found on the Internet:
Wordpress3.1 loop redirection error Solution
Anando provides two solutions. Modify the/template-loader.php file or canonical. php file under WP-include, respectively. The modification is not complex. The disadvantage is that the kernel file is changed. You must pay attention to the changes later. The official team did not provide a solution, so they had to adopt this solution.
Loop redirection solution 1
Disable the aboveCodeTo solve the loop redirection error.
Locate the template-loader.php file under the WP-include folder and comment out lines 6 and 7 with/** code.
1 |
If (Defined ( 'Wp _ use_themes' ) & Wp_use_themes) |
2 |
Do_action ( 'Template _ redirect' ); |
Solution 2
Solve WordPress loop redirection by assigning values to do_redirect
Find the canonical. php file in the WP-include folder and comment out the 37th rows. Add the following code to the next line. In fact, the variable $ do_redirect is changed to false.
1 |
Function Redirect_canonical ( $ Requested_url = NULL, $ Do_redirect = False ){ |
Solution 3
Find the functions. php file in your current topic folder, and add the following code at the end:
1 |
Remove_filter ( 'Template _ redirect' , 'Redirect _ canonical' ); |
Solution 4
Plug-in method. Download permalink Fix & disable canonical redirects pack and install it.