admin管理员组文章数量:1124409
I'd like to access the 404 page generated by wordpress through actually requesting it. It will need to be requested programmatically and I want to be sure it will always be the 404 content, so any random url to trigger an actual 404 wouldn't work. To make things right, it should also probably answer with the 200 http status.
A documentation page says it should be /index.php?error=404
but on my setup it only displays the homepage.
Has this been changed since the writing of the documentation or is it a bug ?
I'd like to access the 404 page generated by wordpress through actually requesting it. It will need to be requested programmatically and I want to be sure it will always be the 404 content, so any random url to trigger an actual 404 wouldn't work. To make things right, it should also probably answer with the 200 http status.
A documentation page says it should be /index.php?error=404
but on my setup it only displays the homepage.
Has this been changed since the writing of the documentation or is it a bug ?
Share Improve this question asked Mar 5, 2024 at 10:12 challetchallet 1114 bronze badges1 Answer
Reset to default 1Yes this this doesn't work when you have custom permalinks enabled. See the red warning box on the page you linked:
WARNING: If you are using custom permalink, the trick below does not work, see this: http://core.trac.wordpress.org/ticket/7592.
The trac ticket was closed as invalid so doesn't look like this will change.
本文标签: 404 errorWhat is the correct url to request the 404 page
版权声明:本文标题:404 error - What is the correct url to request the 404 page? 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1736628890a1945734.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论