• WezleyJ

    (@wezleyj)


    I have an issue with my wordpress installation, its regarding logging into the admin dashboard and server handling of urls with and without the “WWW” part of the string:

    Quite simply if I am logged into the Dashboard: https://www.domain.com/wp-admin

    and then if I force the page to go to https://domain.com/wp-admin then wordpress logs me out and sends me back to the login screen

    What I would like to do is the following:

    Have everything on https://domain.com/wp-admin/anything redirect to https://www.domain.com/wp-admin/anything but still keep me logged in.

    The reason why this is important in case you were wondering is that certain 3rd party applications (Jetpack in particular) are redirecting to https://domain.com/wp-admin/someurl which then results in the user being logged out, and the session terminated.

    I have attempted the following – all with no results:

    1. Put a .htaccess file in the wp-admin folder which adds www to url
    2. checked the wp_options table and made sure application field has www in url

    Any suggestions and help would be appreciated – Thanks in advance for the help and support

Viewing 4 replies - 1 through 4 (of 4 total)
  • jberghem

    (@jberghem)

    Well the fact remains that https://www.mydomain.com and mydomain.com are two different addresses even if they point to the same folder on the server.

    the session cookie is linked to the domain so if you change from mydomain.com to https://www.mydomain.dom the session will be terminated because it is a different (sub)domain

    Is it possible to keep the session active? Probably it is but that’s not going to be quick fix. So unless you have extensive knowledge of how sessions are build up and can write PHP like you write English it going to be a big and difficult task to do.

    Secondly idk if you would want that from a security standpoint.

    What is best is to have everything (including jetpack etc) redirect to https://www.mydomain.com otherwise you will get different stats for with and without the www

    Thread Starter WezleyJ

    (@wezleyj)

    Thanks for the reply…

    From what I am reading above it seems like its not just a clean quick fix.

    I am surprised that this is not just an option that you can switch on and off – I cant think of a situation where someone would want to deal with https://www.domain.com and domain.com differently?

    jberghem

    (@jberghem)

    It comes into play when you have numerous sub domain like
    https://www.mydomain.com
    blog.mydomain.com
    webshop.mydomain.com
    members.mydomain.com

    Then to which subdomain should mydomain.com redirect?

    Thread Starter WezleyJ

    (@wezleyj)

    ok, I see – but for subdomains I would handle each on the sever with htaccess redirects. But I do get what you saying…

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘WordPress Admin Dashboard Redirect Issue’ is closed to new replies.