Support » Plugin: WordPress MU Domain Mapping » Domain Mapping Enhancements

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Ron Rennick

    (@wpmuguru)

    with a little sunrise.php magic and a couple filters, those sub-directory based sites can be mapped to domain based URLs (or any other).

    The current version can do that without any tweaks.

    Thread Starter Rory Murphy

    (@irishlagger)

    Actually really glad to hear that – I did a first hack while working at a previous employer about 18 months ago and just recently had the time and the freedom to rewrite things from scratch. I hadn’t been keeping up with all the updates, but great if it’s out of the box.

    I pulled down the latest and tried 3 scenarios my updates support, two of which appeared to work and one which did not. Wanted to check if I’m doing something wrong. The last one involves mapping to a different domain and a different sub-directory name, so I wasn’t sure if that is a supported mapping type. Appreciate any insight.

    Sub-directoty based multisite install at http://www.domain1.com/ with a blog called myblog. Domain mappings are

    http://www.foo.com/myblog (works)
    http://www.bar.com/ (works)
    http://www.foobar.com/testblog (redirects me to the root wordpress site at http://www.domain1.com)

    Thread Starter Rory Murphy

    (@irishlagger)

    Side question, but, in the past, every once in a blue moon WordPress would seem to get confused about URLs for media items and start returning URLs off http://www.foo.com for every request, regardless of which URL users came in on. This was a problem for us since http://www.foo.com required authentication, causing images to 403. Have you ever heard of anyone else experiencing this behavior when using the plugin? It would only occur every few months without a clear cause, so it was impossible to debug, hence the added filters to attachment URLs for insurance. Strangely, when we did see it, un-attaching and re-attaching one image to one post seemed to correct it across all pages and sites.

    Plugin Author Ron Rennick

    (@wpmuguru)

    http://www.foobar.com/testblog (redirects me to the root wordpress site at http://www.domain1.com)

    Domain mapping is for mapping domains vs mapping domains and paths. Domain maps are to the root of the website. DNS works on domains not domains and paths.

    Thread Starter Rory Murphy

    (@irishlagger)

    I’m not sure I follow how the piece about DNS – http://www.foo.com, http://www.bar.com, and http://www.foobar.com are all CNAMEd to http://www.domain1.com and they are all ServerAlias-es on the same VirtualHost. So all the requests are getting to WordPress the exact same way and that’s all separate from WordPress’s ability to map a URL to a blog id and vice-versa, which the plugin handles quite nicely.

    My intent was only to offer up that, with the code I referenced (which is free for one and all), the domain mapping plugin can be used to allow sites to be mapped to an even wider array of URLs – with a very minor tweak to one of the rewrite rule for the media files in .htaccess, it can even allow you to have an authoring URL like http://www.domain1.com/foobarblog/ and serve it up externally at a URL like http://www.foo.com/bar/space/filler/myblog/

    I found the modded domain mapping plugin indispensible when I was administering dozens of sites in a large media & technology company. We would use it for all sort of ad-hoc sites – sometimes in a root domain, but often as a micro site in a sub-directory off a domain where the main site was served up by different servers using a different technology (and a sub-directory was reverse proxied to our WordPress cluster). We didn’t always have any flexibility in the URL structure – if the CEO said he wanted his blog to be http://www.foo.com/about/ceo/, we could make it happen using the same multisite instance hosting http://www.bar.com/. There were also cases where we had two sites with seemingly conflicting names – http://www.coolproduct.com/about/ and http://www.hotproduct.com/about/, but we could handle this by making the authoring URLs something like http://www.domain1.com/aboutcool/ and http://www.domain1.com/abouthot/ and using the plugin (with mods) to map them to their correct external URLs.

    Totally cool if a lot of that is outside the uses you had intended or wish to support for the plugin, but I found it extremely valuable to pushing WordPress’s limits and allowing it to be used as an enterprise platform for all kinds of sites beyond blogs, and wanted to put it out there for others who might be trying to do the same.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Domain Mapping Enhancements’ is closed to new replies.