Simulating separate trackback and comment URLs with Movable Type

| 0 Comments
One problem that I see a complaint about every so often with Movable Type is that you have several independent blogs that use the same URL to get to their trackback and comment scripts. To get around this, I discovered a little trick. Modify your templates so that each template points explicitly to the URL of your blog, assuming it's on a separate domain. For example, change all references to the trackback script to explicitly point to http://www.domain2.com/mt/mt-tb.cgi if your installation of Movable Type is hosted at http://www.domain1.com/mt/. Now, create a symlink between "mt" in the directory that hosts domain2.com and your mt directory under domain1.com/mt. Then, in the root directory of domain2.com, add the following statement to .htaccess (create a file named .htaccess if it doesn't exist):

Options +FollowSymlinks
That's it! Now, whenever someone points to http://www.domain2.com/mt/mt-tb.cgi, it should be internally mapped, without any problems, to http://www.domain1.com/mt/mt-tb.cgi. I tested this out with the trackbacks and it worked fine.
For those that don't know how to create a symlink on a UNIX system, the command is:

ln -s DIRECTORY_TO_LINK TO NAME_FOR_SYMLINK

Assuming a directory structure of:

/home/me/public_html/mt
/home/me/public_html/domain2

where /home/me/public_html is the root directory of domain1.com at your host, ln -s /home/me/public_html/mt /home/me/public_html/domain2/mt would work.

Leave a comment

March 2010

Sun Mon Tue Wed Thu Fri Sat
  1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30 31      

Recent Entries

The three purposes of the federal income tax law
Businesses will spend about 3.4 billion man-hours and individuals about 1.7 billion hours figuring out their taxes this year.…
Progress of a different sort
You know we have reached a level of decadence seldom seen in the history of the West when our women…
And police wonder why the public rarely trusts them
But there is some good news to report here, too. The Maryland state law, as noted, is the first…

Subscribe

Advertisements

OpenID accepted here Learn more about OpenID