Support » Fixing WordPress » 404 pages not working?

  • I have only today noticed that on my blog if you try to load a page that doesn’t exist, instead of showing a normal 404 error, I get a strange result – a bit of text from my footer shows and that is it!

    What can be wrong?!

Viewing 12 replies - 1 through 12 (of 12 total)
  • I have made a couple of changes and now, instead of showing part of my footer i get a page can’t be displayed error – still no 404!?!?!?

    as another update – if i remove the htaccess file that comes as standard with WordPress the 404 header works but obviously I need the htaccess file back for my posts to load etc?!?

    The permalink structire I use is /%postname%/

    Has anyone got any ideas?

    To give people some more information:

    Permalink structure set within WordPress admin panel is: /%postname%/

    htaccess file looks like:

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /blog/
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /blog/index.php [L]

    # END WordPress

    When I remove the htaccess file, the 404 works as it should but obviously my blog links do not work…

    When I put the htaccess file back, all links are fine but when you type in a page that doesn’t exist, I just get a blank page (no 404 header or anything as I should).

    Would love to hear from someone who can help.

    The permalink structire I use is /%postname%/

    Do not use just /%postname%/ as your permalink structure, it will only cause you problems.


    I have been using this structure for a long time – what can I do now – I have 100+ pages all indexed in Google using this structure!?


    1. WordPress doesn’t come wiht any kind of .htaccess file.
    2. You created it when you wanted to use “nice” permalinks.
    3. Create a 404.php file in your theme’s folder and put into it whatever you want. It will be shown when wrong address is typed.

    STOP posting the same in ten topics! (I am fast with the delete button)

    moshu – i haven’t posted 10 topics – there was only this and 1 about changing the post structure which isn’t the same topic.

    with regards to creating a 404.php – there is one there but it just doesn’t seem to work unless I stop using the htaccess file.

    (Let’s not argue about the number of topics I had to delete…)

    Your permalinks work at this address:

    As for 404 – did you try to take a look how it is done in the default theme and use the same code/stuff?

    if you had to delete 10 posts then there is something wrong as I can promise there should only have been 2…anyway…

    It’s not the permalinks I have a problem with? I have a problem with pages that don’t exist not delivering a 404 status like they’re supposed to. I tried changing my theme to the default wp one and it still doesn’t work.

    Did you leave in the whole
    <?php if (have_posts()) : ?>
    bit of code in your 404 template?

    I was getting a blank 404 result on one of my templates and then I thought to remove all of those related snippets, removed the related
    <?php endif; ?>
    tags, the page navigation bits and voila!

    My 404 results now show the intended information and layout without any
    problems. No messing with my .htaccess file, no messing with my permalinks etc. Simply discovered my blunder of leaving in the post query in the 404 template – maybe you copied that stuff in there by accident, too?

    Did you ever solve your problem?

    I’m having basically the same problem. I use “/%postname%/” too, and it’s worked well for everything except this.

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘404 pages not working?’ is closed to new replies.