Movable Type Hack: Multiple domains, one installation

I believe that I accomplished a minor feat in the world of Movable Type hacks, and it required no Perl or SQL knowledge at all. I set up Holly’s blog on her site tonight. They’re both hosted on the same box, and use apache’s domain based virtual hosting to keep them independent of each other. However, we are sharing the same MT installation. The problem? In all of her pages, her links to scripts (such as trackbacks and comments) were coming back to recompiled.org instead of to her domain. Why? The CGIPath in the mt.cfg specified recompiled.org as the path. How did I fix it? Read on, my friend (or friends, but, friend is more likely).

Basically, our sites are independent of each other with no co-dependencies, other than Movable Type. Using the logic that the mt.cfg file specifies where the path is, I simply duplicated the MT directory used for Recompiled to her directory and updated the file accordingly. Since they are still both using the same database, all of the rest of the stuff works as planned. The exception will be plugins and the like, but, I imagine her system will be left alone for the most part from here on out.

So, the structure looks like this:

www-folders

-> holly_site

–> mt

—> mt.cfg with CGIPath to her site URL

-> recompiled

–> mt

—> mt.cfg with CGIPath to my site URL.

They share the same database, which means I can still make any necessary technical configuration changes to her blog I need to without logging out of my sessions. The only think I will need to be aware of is rebuilding her site from my interface.

Yes, I know this is a bit incoherent, but, I’m about to fall asleep at the keyboard. If anyone stumbles across this and wants more specifics, comment or e-mail me or something.