Timeline for Wordpress Nginx Won't 404
Current License: CC BY-SA 4.0
11 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Aug 7, 2022 at 19:34 | answer | added | Flux | timeline score: 0 | |
Aug 7, 2022 at 19:04 | comment | added | Flux |
"the site won't 404 and instead rewrites the URL to the homepage" — Is there a redirection? i.e. Does accessing http://example.com/nonexistent change the URL in the web browser's address bar to http://example.com/ ?
|
|
Sep 5, 2018 at 19:19 | comment | added | pan | Tried an entire fresh install of WordPress, still not luck. | |
Sep 4, 2018 at 21:13 | comment | added | Pat J | Have you disabled all plugins and switched to a default theme, to ensure that a plugin or theme isn't "helpfully" redirecting 404s to the home page? | |
Sep 4, 2018 at 20:43 | history | edited | pan | CC BY-SA 4.0 |
added 144 characters in body
|
Aug 29, 2018 at 18:44 | comment | added | pan | Hi Richard, yes that is how i understand the 'try_files' line also. Wordpress is not generating the "not found" page for any request that should 404 instead it just loads the homepage with the incorrect URL. Not sure if it's a nginx thing or a WordPress thing. | |
Aug 29, 2018 at 8:30 | comment | added | Richard Smith |
The line try_files $uri $uri/ /index.php?$args; sends anything that isn't a static file to WordPress. Which is actually a desired behaviour, as it allows WordPress to see every request and implement pretty permalinks (if you have them enabled). Are you not seeing a WordPress generated "not found" page?
|
|
Aug 28, 2018 at 21:45 | comment | added | pan | reloaded more times than i can count | |
Aug 28, 2018 at 21:42 | comment | added | Castiblanco |
Sounds silly but It happens to me once, did you reload? $ sudo service nginx reload
|
|
Aug 28, 2018 at 21:40 | review | First posts | |||
Aug 29, 2018 at 1:36 | |||||
Aug 28, 2018 at 21:38 | history | asked | pan | CC BY-SA 4.0 |