WordPress.org

Ready to get started?Download WordPress

Forums

WordPress MU Domain Mapping
[resolved] Using central SSL'd login (16 posts)

  1. Deku-shrub
    Member
    Posted 1 year ago #

    Hi there

    I'm trying to secure admin access to our multi domain mapped wordpress installation.

    The current workflow is that a users logs in at:
    http://site.userdomain.tld/wp-admin/
    then gets 301 redirected to:
    http://wordpress.our_ssl_enabled_domain.tld/wp-admin/userdomain/
    They then end up at their user dashboard which is good.

    I've added support for https://wordpress.our_ssl_enabled_domain.tld/, so with a htaccess rule, can redirect like so:

    # if you're not on the SSL enabled domain
    RewriteCond %{HTTP_HOST} !^wordpress\.our_ssl_enabled_domain\.tld
    # and you try to access the admin
    RewriteCond %{REQUEST_URI} ^.*/wp-admin
    # go to the ssl enabled admin path
    RewriteRule ^(.*)$ https://wordpress.our_ssl_enabled_domain.tld/wp-login.php [R=301,L]

    This method loses the /userdomain/ variable as that needs to be given by this plugin so the user no longer ends up at their custom dashboard which is no good.

    It's not acceptable to have the user login over plain text at http://site.userdomain/wp-admin/ then get redirected back to https://wordpress.our_ssl_enabled_domain.tld/wp-admin/userdomain/ ask the login credentials have already passed in plain text over the wire.

    Can you suggest how to handle this please?

    http://wordpress.org/extend/plugins/wordpress-mu-domain-mapping/

  2. Ron Rennick
    MultiSite Guru
    Plugin Author

    Posted 1 year ago #

    Try changing the last 3 lines to

    `
    RewriteCond %{REQUEST_URI} (^.*/)wp-admin
    # go to the ssl enabled admin path
    RewriteRule ^(.*)$ https://wordpress.our_ssl_enabled_domain.tld/%1wp-login.php [R=301,L]

  3. Deku-shrub
    Member
    Posted 1 year ago #

    After login that sends me to:
    http://wordpress.our_ssl_enabled_domain.tld/site.userdomain.tld which 404s

    I need to pass through the domain subfolder some how which doesn't appear to be available via simple .htaccess manipulation since it comes out of wordpress.

    The url logins should happen at I believe should be:
    https://wordpress.our_ssl_enabled_domain.tld/wp-login.php?redirect_to=https://wordpress.our_ssl_enabled_domain.tld/wp-admin/userdomain/

    Apache doesn't see /userdomain/ so doesn't know to send me there. I suspect only same-domain login is currently supported by the plugin if one wishes to retain the site-specific dashboard page.

  4. Ron Rennick
    MultiSite Guru
    Plugin Author

    Posted 1 year ago #

    You might also have to filter the login redirect url.

  5. Deku-shrub
    Member
    Posted 1 year ago #

    Providing a valid url after login I end up at https://wordpress.our_ssl_enabled_domain.tld/wp-admin/

    This is no good as I need to go directly to:
    https://wordpress.our_ssl_enabled_domain.tld/wp-admin/userdomain/ :(

  6. Ron Rennick
    MultiSite Guru
    Plugin Author

    Posted 1 year ago #

  7. Deku-shrub
    Member
    Posted 1 year ago #

    Yes sorry, the second url, that's where I need to end up.

  8. Ron Rennick
    MultiSite Guru
    Plugin Author

    Posted 1 year ago #

    Check you DM settings to see that you want the original site admin area.

  9. Deku-shrub
    Member
    Posted 1 year ago #

    Yes, I've enabled that, but by the time I'm forwarded to https://wordpress.our_ssl_enabled_domain.tld/wp-admin/ the original domain name has been lost from the url.

    Logging in at http://site.userdomain.tld/wp-admin/ works appropriately but isn't secure.

  10. Ron Rennick
    MultiSite Guru
    Plugin Author

    Posted 1 year ago #

    You might also have to filter the login redirect url to provide the login page with the correct URL to redirect to.

  11. Deku-shrub
    Member
    Posted 1 year ago #

    That's the issue! I don't have the correct url the /sitename/ is not in the url. The basic non-ssl implementation requires (plain text) login and gets that bit of the url on logging in.

    There's no way of ending up at the correct url just using .htaccess rules IMO, there needs to be some code support.

  12. Ron Rennick
    MultiSite Guru
    Plugin Author

    Posted 1 year ago #

    Glad you sorted it out.

  13. Deku-shrub
    Member
    Posted 1 year ago #

    ... sorted it out? No, I'm saying the multi domain plugin doesn't support central SSL.

    Quote to implement support?

  14. Ron Rennick
    MultiSite Guru
    Plugin Author

    Posted 1 year ago #

    sorted it out? No, I'm saying the multi domain plugin doesn't support central SSL.

    Resolved as far as what you need to do to correct the issue. I was still attempting to help you figure out what was wrong even though it's not an issue directly related to the DM plugin itself.

    Quote to implement support?

    I work full time and do not take any side projects.

  15. Deku-shrub
    Member
    Posted 1 year ago #

    I'm just looking for the magic words 'this functionality is not supported' so that I can get dev time or budget to fix the issue internally rather than it being something I can fix with configuration alone.

  16. Ron Rennick
    MultiSite Guru
    Plugin Author

    Posted 1 year ago #

    I can do that for you - the functionality you are trying to implement is not included/supported.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.