WordPress.org

Ready to get started?Download WordPress

Forums

problem with non-existent pages (6 posts)

  1. peredur
    Member
    Posted 2 years ago #

    Hi,

    This may be a very naive question, but I can't seem to get the 404 page when I try to access a non-existent page. Instead I get what looks like a fragment of the HTML for the Dashboard!

    For example, you can try it at:

    http://www.urbanwords.org.uk/blah

    (Where 'blah' clearly does not exist)

    Just out of interest, I tried 'blah.php', which gives exactly the same result. If you try 'blah.html' the browser tries to render the result, but the result is basically the same.

    I'm using a custom child theme based on twentyten, but I've not done anything with the 404 page.

    Any help would be greatly appreciated.

    Thanks

    PAE

  2. Samuel B
    moderator
    Posted 2 years ago #

    if you have not modified 404.php, I would try:
    1 - looking in host control panel to make sure the generic host 404 isn't taking over

    2 - re-saving permalinks
    dashboard - settings - permalinks

    3 - deactivate all plugins and then re-activate one by one, testing in between to rule out a plugin error

    4 - maybe try this plugin to force it
    http://wordpress.org/extend/plugins/smart-404/

  3. peredur
    Member
    Posted 2 years ago #

    Hmm. Things aren't as bad as I thought. Not good, but not as bad as I thought. The html that I see is the html for the admin bar, so if you're not logged in, you don't see it. On the other hand, you don't see anything else, either. Just a blank page.

    I took a look at the ISP Control Panel, but couldn't see anything there that looked helpful. And I saved the permalinks: but that didn't help either.

    It looks as though I'm going to have to do the plugin thing, which scares me a bit, I must confess. Wimp. I know.

    I'll let you know how I get on.

    Cheers

    PAE

  4. peredur
    Member
    Posted 2 years ago #

    Sorry to reply to myself.

    I just looked at the .htaccess file in the document root. It reads:


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

    Shouldn't that be opening the index.php file if the requested file doesn't exist?

    Cheers

    PAE

  5. Samuel B
    moderator
    Posted 2 years ago #

    that's a normal .htaccess
    the rewrite is referring to permalinks
    your theme should automatically pick up 404 page
    try copying over the 404.php to your child theme

  6. peredur
    Member
    Posted 2 years ago #

    Nope. Doesn't change anything I'm afraid.

    Cheers

    PAE

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags