Login link goes to a 404 not found page (12 posts)

  1. bozzy
    Posted 9 years ago #

    When people click on the 'you must be logged in to comment' link it goes to a 404. Why is this and why does it occur?

    here is a sample post from my blog:

    login link:

    why is it redirecting to a page that does not exist on the server?

    I'm really confused.

  2. bozzy
    Posted 9 years ago #

    it's about this part of code in the comment template:

    <?php if ( get_option('comment_registration') && !$user_ID ) : ?>
    You must be <a>/wp-login.php?redirect_to=<?php the_permalink(); ?>">logged in</a> to post a comment.
    <?php else : ?>

    but it doesn't redirect to the post, it goes to a 404.

  3. That code is correct. It's not supposed to redirect to the post, it's supposed to display the login screen with a hidden redirect, so that when you login, it takes you back to the post you came from.

    Check that your wp-login.php file has not been messed up in some way. Also look and see if you have any plugins that may mess with the login process.

  4. bozzy
    Posted 9 years ago #

    I only have 6 plugins: Akismet, Democracy, Live Comment Preview, WP_Amazon, WordPress Database Backup, and Search Excerpt...

    I just upgraded to 2.0.3 so the wp-login.php should be perfect...

    what am I missing?

  5. Chris_K
    Posted 9 years ago #

    What happens after you temporarily disable Live Comment Preview?

  6. bozzy
    Posted 9 years ago #

    Still the same error.

  7. bozzy
    Posted 9 years ago #

    Why does it redirect to the post? I didn't mess with any of the templates... I just upgraded...

  8. You have some kind of URL Rewriting problem. Either in your htaccess file or with your host or something along those lines.

    This link works:

    This link does not:

    Note that this fails as well:

    Which is ridiculous, of course, since wp-rss2.php doesn't use the "test" parameter.

    You have some form of URL Rewriting going on that is breaking these links.

  9. bozzy
    Posted 9 years ago #

    This is what's in my htaccess file:

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

    # END WordPress

    that was generated by wordpress, so it shouldn't causing any trouble.

    that's all that is in the file.

  10. bozzy: Well, then something is wrong with your host's configuration. Check with them.

  11. bozzy
    Posted 9 years ago #

    Alright, I will. Thanks man. :)

  12. bozzy
    Posted 9 years ago #

    Yup, that's what the problem was and my host fixed it.

Topic Closed

This topic has been closed to new replies.

About this Topic