Today, I am staying at home for another day to build a new Wordpress blog. The server uses nginx.
Because another nginx + Wordpress blog was built before, the previous nginx configuration is used directly, and the following configuration is used:
If ($ host! = 'Www. ABC. me '){
Rewrite ^/(. *) $ http://www.abc.me/#1 permanent;
}
We can see that this is used to redirect ABC. Me To www. ABC. Me.
After this configuration item is addedThe browser reports multiple links and uses chrome to redirect the links before www. ABC. Me and ABC. Me.
After finding this problem, I first thought it was a problem with nginx configuration.No related configurations were found except for the above redirection from ABC. Me To www. ABC. Me, and this problem was not found in the previous configuration of another website. Where is the problem?
After a long time of hard work, I could not go around, so I had to try to comment out the redirection mentioned above and try again. I found it was okay and I won't redirect it.
The phenomenon becomes like this:
After ABC. Me is opened, www. ABC. Me will not be redirected and the webpage can be opened smoothly.
However, after www. ABC. Me is opened, it will still be transferred to ABC. Me, And the webpage will be OK.
This shows that the redirection from www. ABC. Me To ABC. Me is still working together, although I don't know where it is.
I was puzzled, and suddenly a flash of light, this thing will not be related to the site address I set in the WordPress background, a check, it is indeed set ABC. me, this setting will put www. ABC. me to ABC. me?
After you try to change it to www. ABC. Me, you will find that this setting can actually redirect ABC. Me To www. ABC. Me.
This seems to have the same effect as the configuration I wrote in nginx.
I have never thought about this setting in the WordPress background. It's amazing :(
I have to study WordPress'sCodeWhere is it.