• I’m learning more about wordpress file structures. Recently, I customized my own 404 template, 404.html file, in the public_html/theme/twentytwentyfour/templates directory to redirect users back to my home page.

    However, I notice that when I go to settings/permalinks and change
    FROM: Custom Structure, https://mysite.com/%category%/%postname%/
    TO: Plain, https://mysite.com/?p=123

    instead of my custom 404 template, it displays a file not found from 404.shtml in the public_html directory.

    This behavior is repeatable because when I revert back to the custom structure, it returns to the customized 404 template.

    How does changing the permalink setting as described determines which 404 file is executed?

    Ronald Cross

    • This topic was modified 1 month, 3 weeks ago by stemsrus. Reason: update title and content
Viewing 1 replies (of 1 total)
  • This probably has more to do with the settings on the web server for handling ErrorDocument. The web server is trying to call a local file that does not exist. The fact that this is a file other than the one managed by WordPress can be recognized by the .shtml file extension. Contact your hoster’s support team to clarify this.

Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.