Make WordPress Core

Opened 2 years ago

Closed 2 years ago

#47927 closed defect (bug) (invalid)

Nginx Rewrite problems after 5.2.2 was released.

Reported by: mitchellk Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: Rewrite Rules Keywords:
Focuses: Cc:


I've been running WordPress on Nginx for over 2 years without fail.

Exactly on June 18 2019 when 5.2.2 was released large amounts of rewrite errors popped up on every single site.

This problem was not noticed until a week ago when I got several thousand errors in Google Search Console that my sites were all giving 404 errors.

None of my nginx virtualhost configs have changed in 2 years and Nginx was last updated several months ago.

Viewing the pages reported by Search Console as giving 404 showed they all worked just fine in a browser but in the backend every single pages access was generating an error in the error.log as follows.

"/var/www/mysite.com/my-pretty-permalink/index.php" is not found (2: No such file or directory)

I do not use index.php as I have my permalinks structured as /%category%/%postname%/

But exactly on to the day I updated this error appeared on every single site.

So /index.php started being tagged onto everything in the backend.

Did something change in any of the changes in 5.2.2 that could have caused this?

Change History (4)

#1 in reply to: ↑ description @SergeyBiryukov
2 years ago

  • Component changed from General to Rewrite Rules

Hi there, thanks for the ticket!

Replying to mitchellk:

Did something change in any of the changes in 5.2.2 that could have caused this?

Here's the list of changes in 5.2.2:

At a glance, I don't see anything that would cause this. There were no changes to rewrite rules or permalink structure handling.

#2 @mitchellk
2 years ago

Hi @SergeyBiryukov yes I looked there too and did not see anything but I cannot explain this.

Nginx and PHP have not been updated on this server in some time.

Could it possibly be a Yoast problem ???

That's the only other plugin I use on all sites that ever has anything to do with rewrites.

#3 @mitchellk
2 years ago

Hi @SergeyBiryukov you can close this. I think I have found the culprit. It appears others have seen this too with Yoast, something with sitemaps that got broken causing /index.php to be added onto the end of everything. Not sure how because the sitemap itself does not show any links ending in /index.php but in the backend of Nginx every single call to something from the sitemap by GoogleBot was requested with /index.php


Last edited 2 years ago by mitchellk (previous) (diff)

#4 @SergeyBiryukov
2 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to invalid
  • Status changed from new to closed

Thanks for the follow-up!

Note: See TracTickets for help on using tickets.