• When invoking a 404 Page Not Found I’m getting either a blank screen or a partially loaded page (i.e. fragments of code from the template 404.php).

    I’ve got my WordPress blog in a subfolder of my domain. I’m using the htaccess file to set errorDocument at the root of the site, and this works fine when the requested file is outside of the blog. For example:

    https://www.lessfussdesign.com/nopage

    But any URLs within the blog and I get this:

    https://www.lessfussdesign.com/blog/nopage

    I’ve tried switching to the default or classic theme (thinking it might be something I’ve done in my theme) but I get the same problem. It’s only for 404 errors, so for example an Access forbidden is fine, even when the URL is in the blog:

    https://www.lessfussdesign.com/blog/wp-content/themes/

    I’ve got a 404.php template in my theme folder, but clearly this isn’t being called. Has anyone come across a similar problem, or can think of something (probably obvious!) that I’m not doing/should be doing?

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter andybryant

    (@andybryant)

    I found another post in this forum from someone who had exactly the same issue, but unfortunately nobody was able to help him – all the replies completely missed the point.

    It’s the .htaccess file that causes the problem. Delete it and disable permalinks in WP and you can use your own error handling instead of the WP default.

    I’m now using ‘almost pretty’ permalinks as they don’t require .htaccess, so all the example 404 links in the above post will now lead to my proper 404 page.

    I’m leaving this open because it isn’t resolved. If anyone else gets anything similar please post a response here.

    I’m getting the same exact problem. I’ve literally been reading for over 10 hours and have yet to find a solution.

    If I don’t use pretty permalinks (and consequently no .htaccess file) the 404 error page WITHIN the theme kicks in for a non-existing link.

    If I use pretty permalinks, post links work, but links like /about, or /contact do not and the user is sent to a SERVER based (Apache) 404 error page.

    Hey, did you ever figure the RSS Feed problem out?

    organicjar, why dont you start your own thread, and ask your own question?

    Ok. I know this is not solution to this problem, but I’m posting this as this thread is displaying on google search result for 404 error problems.
    If you are using only pages, probably your 404.php will not work and your page.php doesn’t have code for “no posts”. So copy the else part of having posts section and paste it in your page.php

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Error page template (404.php) not loading’ is closed to new replies.