I have an aliased domain (ALIASDOMAIN.COM) that refers to a subdirectory of my main domain (MYDOMAIN.COM/ALIAS/). When I tried installing MU into ALIASDOMAIN.COM/BLOGS/, this caused all sorts of problems. I searched these forums and found many folks who had experienced the same problem but none who had found a solution. Well, after a couple hours, I got it to work. This will be a pretty vague solution. Perhaps somebody with more time on their hands would like to modify the installer to eliminate the problem.
The problem is this: when index_install.php tries to find absolute URLs, it uses dirname(whatever). When you use an aliased domain, this causes all sorts of problems. You need to go into index_install.php and search for every instance of dirname and replace it with one of the following:
If you find dirname($_SERVER[SCRIPT_NAME])
, or something similar, change that to "/"
(or "/blogs/"
if you've installed to yourdomain.com/blogs/). If you find dirname(___FILE___)
, change that to the absolute path to your installation, in quotation marks, minus the trailing slash (e.g. "/home/content/html/blogs"
).
A confusing instance is this line:
$url = stripslashes( "http://".$_SERVER["SERVER_NAME"] . dirname( $_SERVER[ "SCRIPT_NAME" ] ) );
Replace it with
$url = stripslashes( "http://yoursite.com");
or, if you've installed into a directory called "blogs",
$url = stripslashes( "http://yoursite.com/blogs";
These problems could all be avoided if the install screen simply asked you to input your URL and absolute path instead of trying to figure paths out on its own in index_install.php. For most users, these fields could be filled in automatically. But for folks using an alias, and especially an alias with a subdirectory appended, having the opportunity to define these settings manually could be a lifesaver.
One more thing. You'll also need to edit wp_config_sample.php and find this line:
define('ABSPATH', dirname(__FILE__).'/');
and change it to
define('ABSPATH', "/home/content/html/blogs/");
or whatever your absolute path is, including a trailing slash.