Score:0

Apache 2.4 AH00687: Negotiation: discovered file(s) matching request: (None could be negotiated)

in flag

Apache 2.4 on Windows 11, thus localhost.

I'm running a Wordpress site and Apache serves all URLs correctly except for one. One URL 404s. The Apache error log contains this error:

AH00687: Negotiation: discovered file(s) matching request: C:/wwwroot/site/the-page; (None could be negotiated)., referer: http://localhost:8090/

How is it possible that Apache can serve all the other PHP pages (Wordpress pages, not posts) and not this one?

What do I need to do to fix this?

The page works in production. I restored the Wordpress database to the localhost in case I had a corruption issue with my local copy, but the problem persists.

Also note, that for all other 404 errors, Apache serves my custom 404 page. For the problem url, it only serves a generic 404 message.

This URL worked as recently as two weeks ago, and restoring the .htaccess file did not fix the problem.

ezra-s avatar
ru flag
I think we are missing context here, please show a "curl" example of the actual request, the appropiate configuration you have in httpd (multiviews?) the access log, error log of the entry of the test , etc.
Karl avatar
in flag
@DanielFerradal how do I show a curl example? This is from the access.log: `::1 - - [31/Mar/2023:06:01:46 -0400] "GET /retirement-calculator HTTP/1.1" 404 196`
Score:0
in flag

After all this time, the issue turned out to be a problem with a random file located in the root of the WordPress project. Specifically:

/wwwroot/<project>/wp-content/themes/<theme>/page-my-page-file.php
/wwwroot/<project>/my-page-file.de.txt

In other words:

WordPress template pages follow this convention: "page-*.php" and are located in the theme's root.

If a file with the same name as the template file but without the initial "page-" exists in in the root of the project, then Apache/WordPress will not serve the web page.

Perhaps this will save someone some time.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.