The MU forums have moved to WordPress.org

1 2 3 ... 5

Domain Mapping Plugin Updated (146 posts)

  1. donncha
    Key Master
    Posted 14 years ago #

    My domain mapping plugin has recently received an overhaul but needs testers. New features:

    1. Works on folder based installs.
    2. Remote login and logout added.
    3. Ability to set the primary domain of the blog.
    4. Added separate admin page under "Site Admn" to configure IP etc.
    5. Supports permanent(301) or temporary(302) redirects, as set by the site admin.

    And lots of bug fixes.

    I need people to test it before I make a final release. Testing so far has been very positive with good feedback so if you have a dev server grab the development zip file from the download page and give it a go.

    This tutorial has a good explanation of how to install and configure it.

  2. kgraeme
    Member
    Posted 14 years ago #

    Nice! What's the remote login/logout part feature for?

  3. donncha
    Key Master
    Posted 14 years ago #

    So you can login/logout of domain mapped blogs! :P

  4. JuanManuel
    Member
    Posted 14 years ago #

    Thanks! Great new features

  5. donncha
    Key Master
    Posted 14 years ago #

    I get the feeling I'm not going to get many people testing this until I release a new version ..

  6. mdvaldosta
    Member
    Posted 14 years ago #

    Works perfectly fine for me. I've checked the 301 redirect though I don't (yet) use the new make primary feature as my blogs use only one domain.

  7. DeannaS
    Member
    Posted 14 years ago #

    Working on testing it...waiting for DNS to propagate....

    I will say that it would be helpful to have more installation instructions. While reading the tutorial I thought to myself..."wait, I haven't found a screen that looks like that..." I had to go spelunking in the code to figure out that the sub-blog domain management screen is under Tools.

    Also, the tutorial is written for sub-domains and I'm working on a sub directory install for testing here, since that's one of the new features. So, at some point, some sub-dir instructions would probably be good, eh?

  8. DeannaS
    Member
    Posted 14 years ago #

    Okey doke - subfolder install, parked the the domain on my main domain. Didn't do anything special and voila - she works!

    Logging in to one domain has me logged into both domains. Ditto logging out.

    I added a file to the sub-blog when it wasn't mapped, and the mapped domain correctly handled it.

    All seems well in the world.

  9. kgraeme
    Member
    Posted 14 years ago #

    Some observations and a question.

    We've been running Ron and Andrea's domain mapping plugin which behaves a little differently. The biggest difference is that with their plugin when a user logs in, the URL for the admin is their mapped domain. When using this one, the dashboard is on the host site domain.

    Pros:

    • Logging in/Logging out is a global. If they're logged in on the host domain, they're logged in on the mapped domains too. This could help with SSO kinds of experiences.
    • SSL certs. With logging in only happening on the host domain we can buy one inexpensive single domain cert instead of needing an expensive UC cert that allows multiple domains.
    • Updates to mapped blogs show up in the host domain's "Updated Blogs" and Sitewide Tags aggregation which is good for when all sites need to contribute content to a portal.

    Cons:

    • The Dashboard being on the host domain breaks the illusion for customers that they're on a dedicated install.
    • Dashboard on host domain could be potentially confusing to customers. For instance, when they upload documents/images it's on the host domain path instead of their domain. When inserted into a post it maps to the correct domain, but if they copy/paste the URL from the media library it's the host domain. So when they link documents/images to customers it may have the "wrong" domain on the link. (With Ron/Andrea's the image path only works for the mapped domain.)
    • For SSL content sites (e.g. secure enterprise blogs), the path difference for images may cause a warning about cross-site content. (e.g. Copy/pasting the link from the media library into a text widget on the sidebar. The image URL stays on the host domain instead of being rewritten to the mapped domain.)
    • Updates to mapped blogs show up in the host domain's "Updated Blogs" and Sitewide Tags aggregation which could be bad if the customer's site should not be aggregated on a host on a domain that is otherwise aggregating subdirectory blogs.

    Questions:

    • Donncha or anyone, can you see any other cases where the dashboard being the host domain will cause problems? Will it only rewrite the URL for post content, so any sidebar widget will have the host domain path?
    • What's the viability for either of these plugins to add a switch to enable/disable aggregating on a per-mapped-blog case? There are times it's desirable to have a mapped blog be aggregated to the host domain and times it's better to keep it isolated. (Andrea, I know you're reading this too. ;-) ) I'm pretty sure we could do it, but I prefer to not hack up other people's stuff if they're amenable to adding features.

    Donncha, thanks again! Some of these pros/cons are more for picking the right plugin for a specific use-case rather than one being universally better than the other. And because of this, it's great to have multiple domain mapping plugin options. So even though this one adds subdirectory support, it does it in a different way than Ron/Andrea's and that gives users the choice of which solves their needs best.

  10. tmoorewp
    Member
    Posted 14 years ago #

    Donncha,

    I've tested your plugin a bit on my server and it seems to run just fine. Haven't run into any issues yet.

    Thanks,

    Tim

  11. donncha
    Key Master
    Posted 14 years ago #

    kgraeme - thanks for the useful feedback. I'll make redirecting back to the original site optional. You probably didn't check the login/logout urls either because they redirect back to the main site too just so the user is logged in to the main site (if they try to login on the domain mapped site).

    You'll probably need to interrogate the domain_mapping table when displaying your "Last Updated" list. That's the easiest way of doing it.

  12. kgraeme
    Member
    Posted 14 years ago #

    I did notice that the link for login/logout appears to be the mapped domain but when it gets to wp-login.php it is at the host domain. Is that what you mean?

    For an average user, the redirects appear seamless as I click around. So I wasn't thinking of the domain redirects as a bug. Just an implementation approach.

    As I mentioned, the only situation so far that I've been able to make the "wrong" version of the url appear in a mapped site is when pasting an image URL into the text widget. That's mostly a user perspective issue rather than a technical one, except for the rare site that protects all post content with SSL. Though it might also make for a little more cleanup when exporting/importing a blog.

  13. miklb
    Member
    Posted 14 years ago #

    I concur that it might be confusing not to see the mapped domain in the admin URL.

    Are you suggesting it would be an option under Site Admin -> Domain Mapping whether to use the mapped domain in the admin URL or to use the original subdomain?

    Haven't noticed any issues otherwise. Definitely like the move of the IP address to a Site Admin options

  14. kgraeme
    Member
    Posted 14 years ago #

    I have to admit that I'm kind of confused by the IP address field. Is it for anything other than a reminder to the admin to set an A-name record in DNS?

  15. miklb
    Member
    Posted 14 years ago #

    Correct, it's just a setting to let individual users know what IP address to use if they are setting their own A Records. Which I've yet to figure out how to set a catch-all so if I were to have a set up where blog admins did that themselves, it would resolve on its own.

  16. donncha
    Key Master
    Posted 14 years ago #

    Grab the development version again please! The UI for the user to set the primary blog has been updated. The clunky button is gone now.

    I also fixed a problem with caching the domain mapping details of a domain. That might hit people who use the current version and more than 1 domain..

    The Site Admin page now has a checkbox to force the admin to redirect back to the original blog url(this is what WordPress.com does). By default it'll stay on the domain mapped blog now.

    Also, you *have* to have a primary domain. The previous version allowed your blog to be visible at two domains which is a huge problem for duplicate content and search engines. Now you can set the original blog's url as the primary domain.

  17. andrea_r
    Moderator
    Posted 14 years ago #

    Wow, tons of great feedback. Yes, we're pretty amendable to options. That's why we did our version, and that's why the GPL is great. We've shared a lot back & forth with Donncha because as you say - they appeal to two different use cases.

    My brain is a little fried though, so I need to come back to this.

  18. eyecool
    Member
    Posted 14 years ago #

    Works as advertised on an nginx setup.

    Had a few hiccups with logging out across all sites at first, but I didn't clear cookies and cache. After a few login/logouts, it was working great.

    I swapped Ron and Andrea's version with yours on a live test install with 3 mapped domains. Added 2 more domains once yours was installed. Nothing broke. I then swapped yours for theirs. Everything working. Changes saved. 5 domains mapped. Remote login. Awesome!

  19. miklb
    Member
    Posted 14 years ago #

    Very nice! Do I understand the permanent redirect option to be a 301 redirect for the subdomain (original blog url)?

  20. donncha
    Key Master
    Posted 14 years ago #

    miklb - yeah, it's a 301 permanent redirect.

    I realised this morning that the remote login could be easily exploited as it uses an auto increment key. The id field in the logins table will become a varchar(32) and of course lose the auto increment attribute.

  21. DeannaS
    Member
    Posted 14 years ago #

    I upgraded the plugin to the latest version. I was able to successfully log in and log out, keeping the domain intact. I've uploaded some images and such. Everything seems to be working as expected. Woo hoo!

  22. kgraeme
    Member
    Posted 14 years ago #

    The toggle for "Redirect administration pages to original blog's domain" doesn't appear to be doing anything.

    Whether checked or unchecked when logging in to a mapped domain, I am redirected to the original host domain.

  23. donncha
    Key Master
    Posted 14 years ago #

    Check the primary domain on that blog? It works on my test server.

  24. donncha
    Key Master
    Posted 14 years ago #

    Another minor change - the backend wouldn't redirect to the mapped domain (even if the redirect checkbox on the site admin page was unchecked) but it does now.

    May need to grab domain_mapping.php from svn at http://svn.wp-plugins.org/wordpress-mu-domain-mapping/trunk for this change. Only made it a minute ago.

  25. DeannaS
    Member
    Posted 14 years ago #

    Toggle works now for me.

  26. kgraeme
    Member
    Posted 14 years ago #

    May have found a bug.

    It's something to do with login/logout. Not sure of all the details yet. Testing.

  27. johnnytee
    Member
    Posted 14 years ago #

    Cool nice upgrades, I would love to see a www. prefix option added so that users could create cname record instead of creating an A record ,that way on the admin side you could easily change your IP.

  28. donncha
    Key Master
    Posted 14 years ago #

    kgraeme - well, if you logout using the original blog domain you won't be logged out in the domain mapped blog.

    If you logout of a domain mapped blog, it'll log you out of the original site too but won't log you out on any other domains on that blog. (Primary domain means this probably won't be too much of a problem)

  29. donncha
    Key Master
    Posted 14 years ago #

    johnytee - the www. will be stripped out so the user will need a CNAME (for the www) as well as an A record (for the domain).

  30. donncha
    Key Master
    Posted 14 years ago #

    kgraeme - found it too. logging in on the domain mapped blog (using the original url) redirects back and forth. :(
    Didn't do that earlier so should be easy enough to track down.

1 2 3 ... 5

About this Topic