WordPress rewrite Solution

Source: Internet
Author: User

I have been plagued by a problem these days. Because my WordPress is stored in the root directory of the website, some sub-directories I have created run some other applications, I found these applications are WordPress. the rewriterule of the htaccess file is affected. the htaccess file allows the rewriterule of the subdirectory to work normally, but it is found that the application that calls the subdirectory always returns the 404 status, but the content is normal.
In fact, if you create a sub-directory to put the discuz Forum, the Forum's rewriterule will also be disturbed. This problem is really confusing, especially when the 404 status is returned, all files will not be indexed by search engines.
After some debugging and modification, I found a strange way to solve this problem, that is, add the following line to the PHP file in the subdirectory. Code:
Header ("State: 200 OK ");
After that, I used some HTTP status testing tools to test the Directory and file. Instead of returning the 404 status, I returned the 200 status. Then I will observe the indexing of this subdirectory in the search engine, it is estimated that it will return to normal. Some of the features of Wordpress are really strange. I don't know why.

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.