These plugins were built to modify and/or extend the functionality of the WordPress MU Domain Mapping plugin on a custom WordPress network. I am posting them in case they are of use to anyone that is using the plugin to map domains on their blog network. I will not be providing extensive support for their use but I can answer questions as to their intended use.
There are two plugins that I developed for use with the WordPress MU Domain Mapping plugin:
1. WordPress MU Domain Mapping .htaccess Addon
In blog networks that are installed in virtual hosting environments, domain names must be declared in the Virtual Host (Apache uses the ServerName and ServerAlias directives) to identify which host is served by which domain name. This may present a challenge with sub-domain networks where multiple names are being routed to the same machine. The challenge is compounded if you plan to host more than one network on the same I.P.
The add-on plugin will allow you to map sub-domains in the MU Domain Mapping plugin without having to explicitly define the sub-domain names in your web server. It works by routing each mapped request to the appropriate un-mapped child blog domain using mod-rewrite and .htaccess rules.
The add-on plugin requires access to a root virtual server account that can act as a default destination for domain requests that are not explicitly linked to a virtual host. An .htaccess file containing the individual redirect rules is created or modified in the public folder of the root account. Mapped requests coming to your host’s I.P. address are then rerouted to the correct child blog via the appropriate mod_rewrite rule defined by the add-on.
Requirements:
- You will need mod_rewrite in order for the add-on to function properly.
- You will need a root account in your server to act as a default. Priority in my environment is alphanumeric.
- The plugin should be Network Activated to work correctly.
The add-on plugin has some basic functionality that allows it to work with MU Domain Mapping plugin:
- Definition of the path to the root .htaccess directory.
- Backup and restoration of the existing .htaccess file (if any).
- Individual blog (de)activation.
2. WordPress MU Domain Unmap Plugin
After discovering that the MU Domain Mapping plugin did not remove existing mapping after deactivation, I developed this plugin in order to be able to quickly remove mapping from all child blogs so I could make a functional copy of that network in another environment.
Requirements:
- You should first deactivate the MU Domain Mapping plugin before activating the plugin.
- The plugin should be Network Activated to work correctly.
View the WordPress Domain Mapping Tools at my github repository.
Users of software offered on this website, and those given permission for its use within software that they distribute, are bound by the following disclaimer of warranty:
DISCLAIMER OF WARRANTY AND LIMITATION OF LIABILITY
THIS SOFTWARE IS FURNISHED “AS IS”. WITHOUT WARRANTIES, EXPRESS OR IMPLIED, THAT THE SOFTWARE IS FREE OF ERROR, OR IS CONSISTENT WITH ANY PARTICULAR STANDARD OF MERCHANTABILITY, OR THAT IT WILL MEET USER’S REQUIREMENTS FOR ANY PARTICULAR APPLICATION. I ACCEPT NO RESPONSIBILITY FOR ANY MATHEMATICAL OR TECHNICAL LIMITATIONS OF THE PROCEDURES AND FUNCTIONS WHICH MAKE UP THE SOFTWARE. WITHOUT ADDITIONAL THOROUGH TESTING BY USER, THE SOFTWARE SHOULD NOT BE RELIED ON FOR SOLVING A PROBLEM WHOSE INCORRECT SOLUTION COULD RESULT IN INJURY TO A PERSON OR LOSS OF PROPERTY. I SHALL NOT IN ANY EVENT BE LIABLE FOR ANY DAMAGES, WHETHER DIRECT OR INDIRECT, SPECIAL OR GENERAL, CONSEQUENTIAL OR INCIDENTAL, ARISING FROM USE OF THE SOFTWARE. USE OF THE SOFTWARE IS ENTIRELY AT USER’S OWN RISK.