WordPress.org

Ready to get started?Download WordPress

Forums

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

  1. bozzy
    Member
    Posted 8 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:
    http://www.bozzysworld.com/2006/06/04/politician-removal-service/

    login link:
    http://www.bozzysworld.com/wp-login.php?redirect_to=http://www.bozzysworld.com/2006/06/04/politician-removal-service/

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

    I'm really confused.

  2. bozzy
    Member
    Posted 8 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. Samuel Wood (Otto)
    Tech Ninja
    Posted 8 years ago #

    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
    Member
    Posted 8 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
    Member
    Posted 8 years ago #

    What happens after you temporarily disable Live Comment Preview?

  6. bozzy
    Member
    Posted 8 years ago #

    Still the same error.

  7. bozzy
    Member
    Posted 8 years ago #

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

  8. Samuel Wood (Otto)
    Tech Ninja
    Posted 8 years ago #

    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:
    http://www.bozzysworld.com/wp-login.php?redirect_to=http

    This link does not:
    http://www.bozzysworld.com/wp-login.php?redirect_to=http:

    Note that this fails as well:
    http://www.bozzysworld.com/wp-rss2.php?test=http:

    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
    Member
    Posted 8 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]
    </IfModule>

    # END WordPress

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

    that's all that is in the file.

  10. Samuel Wood (Otto)
    Tech Ninja
    Posted 8 years ago #

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

  11. bozzy
    Member
    Posted 8 years ago #

    Alright, I will. Thanks man. :)

  12. bozzy
    Member
    Posted 8 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

Tags