Mapping Movable Type subdomains with symlinks – Carrying Stones

Mapping Movable Type subdomains with symlinks

In my experience with content management systems, default settings drop “inside pages” into directories to create URLs like www.foo.com/bar. I prefer mapping subdomains to those directories so URLs look like bar.foo.com.
After putting this design in practice, I ran into problems. For example, any attempt to use the search box from one of my subdomains would lead to an error page.
Movable Type’s configuration file links key directories such as cgi-bin/mt with identifiers like $MT_HOME in the config file. These point to the root directory (something like ~/pub_html); however, for pages within a subdomain it pointed to the root directory of that subdomain instead.
This broke many things, and I was sad.
After some trial, error, and discovery, I found that creating two symbolic links from the subdomain directories to the corresponding root directories corrected the problem, like so:

/sub ~ % ln -s ~/pub_html/mt-static mt-static
/sub ~ % ln -s ~/pub_html/cgi-bin/mt mt

After creating those symlinks, the pieces fell correctly into place. If you have been having similar problems, this symlink tip should set you straight.