WordPress.org

Ready to get started?Download WordPress

Forums

404 acting strangely - redirecting to another part of the site (8 posts)

  1. eharris
    Member
    Posted 6 years ago #

    I'm using WordPress to set up a relatively basic website for my homeowner's association, at http://www.vantagehoa.org - it consists of a handful of pages, some of which redirect to a phpBB 3.0 installation for a forum.

    For some reason, if I go to any page that does not exist, it very briefly displays a page that appears to be a combination of a handful of the pages on the site, and then it redirects to the forum - I suspect that's because one of the pages it's displaying is the "discussion-forum" page, which consists of only an HTML redirect (meta http-equiv="refresh"...).

    I thought perhaps it was something with my theme, which is a very basic custom theme, but when I reverted to the default theme, which has a built-in 404 page (as does my theme), the problem persists, so it's apparently theme-independent.

    I have a couple of WordPress installations running on another host, and neither of them have this problem.

    Any clue what is going on here and what I can do to try to fix it? Again, I tried reverting to the Kubrick-based "WordPress Default" theme and the problem persisted, so my theme is not at fault here.

  2. Sandra-08
    Member
    Posted 6 years ago #

    Your blog probably doesn't know where/name of the 404 error page. Assuming that you have a valid 404 error page, add a line to your .htaccess file. (change 404.html to the name of your error page)

    ErrorDocument 404 /404.html

  3. eharris
    Member
    Posted 6 years ago #

    But WordPress generates the 404 file dynamically, using the 404.php file. I can't use an .htaccess trick because it would need to point to a static HTML page. I could _create_ a static HTML 404 page, but it'd be a bit of a kludgy hack, and I'd need to re-create it any time I made any significant changes to the site's theme or sidebar contents.

  4. eharris
    Member
    Posted 6 years ago #

    Addendum - Because of WP Super Cache, I noticed a dead link to a news posting (blog entry) that had been deleted - I clicked on it, and got my 404 page. Apparently the 404 page is working for _blog entries_, but not pages. If I try to go to http://www.vantagehoa.org/2008/01/01/hello-world/ I get the correct 404 page, but if I try to go to http://www.vantagehoa.org/blahblah/ I get the behavior described above.

  5. ojreadmore
    Member
    Posted 5 years ago #

    Have you solved your problem? I experience the same behavior.

  6. brenton1
    Member
    Posted 5 years ago #

    Hi, I am having a very similar problem...

    When I go to an invalid page, e.g. http://www.azinno.com/nopage.html I should get a 404 error. But WP returns this page every time there is an invalid page, http://www.azinno.com/blog The really weird thing is the /blog isn't the actual page, the page the server is displaying is really long and contains all of the content from the site.

    Not only is this a poor user experience, Google is finding this error and un-validating the site.

    Any ideas? Thanks!

  7. eharris
    Member
    Posted 5 years ago #

    I don't recall ever fixing this problem, but I see that it's fixed now (e.g. by clicking on the two blahblah links above). I guess this was fixed in WordPress 2.6. If you're still using 2.5, brenton, you should upgrade.

  8. jentorme
    Member
    Posted 5 years ago #

    Anyone ever find answers to these problems?

    I'm searching like mad through the forums, and it looks like a lot of people have similar problems but no answers anywhere. Are there other WordPress forums that we can go to for help?

    Brenton, I'm using 2.7 and my problem is similar.

    If I go to: http://example.com/biglong404urldoesnotwork

    the page will render a copy of my main static page, http://example.com/ but the title will say "Page not found"

    (It's basically loading the index.php page)

    This happens no matter how I change the .htaccess file.

Topic Closed

This topic has been closed to new replies.

About this Topic