WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] wp-login.php?redirect_to (4 posts)

  1. jonsp
    Member
    Posted 1 year ago #

    I created a WordPress site in a subfolder (website.com/wordpress/) and then carefully moved it to the root (website.com). I used a script to change any reference to the subfolder location in the database to the root location. Everything is working exactly as it should and it was a huge success...

    except for just one odd detail: when I go to website.com/wp-admin/, instead of just pulling up website.com/wp-login.php it pulls up website.com/wp-login.php?redirect_to=http%3A%2F%2Fwebsite.com%2Fwp-admin%2F&reauth=1

    Why is it redirecting to itself and how can I have it just go to /wp-login.php ?

    Any assistance would be greatly appreciated.

  2. Rajesh Soni
    Member
    Posted 1 year ago #

    Most common problem is caused by inconsistency such as the WWW in the URL.

  3. jonsp
    Member
    Posted 1 year ago #

    I'm a complete idiot. After examining my other WordPress sites, this is totally normal behavior. The /wp-admin/ redirects to the /wp-login.php file with the redirect string attached. That's just what it does.

    Sheesh, this stupid question can be closed and deleted forever.

  4. jonsp
    Member
    Posted 1 year ago #

    I should add, for anyone who finds this and wants to know more, think of it this way:

    /wp-admin/ is where the dashboard and everything is. However, you can't access the dashboard until you've logged in. So when you're not logged in, /wp-admin/ first sends you to /wp-login.php?redirect_to=yoursite/wp-admin/ so after you submit the login information, it redirects you back to the /wp-admin/ where you can now access the dashboard.

    Ta-da. It seems really obvious after the initial realization, but don't feel bad if you found this thinking as I did, "why the heck is it redirecting to itself?"

Topic Closed

This topic has been closed to new replies.

About this Topic