Typepad just added domain mapping. This allows you to point your domain at your blogs.com subdomain via DNS. I wanted this because I didn't want my blog at blinne.blogs.com but rather at www.blinne.org. But, I also wanted other content at www.blinne.org. This meant I couldn't simply repoint www.blinne.org to blinne.blogs.com via DNS. My solution to this problem is outlined below.
Most of the time, the configuration of the Apache web server is done in a centralized fashion. In addition to this, Apache provides for decentralized control with a .htaccess file placed in the same directory as the rest of your files. This gives the end user some control over how the web site will function. Apache is also a modular HTTP server. This allows for extensions to the server. Examples of such modules include mod_perl where Apache runs perl natively and mod_rewrite which we will be discussing today. Whether you can use this or not depends on two things, the web hosting company allows you to use .htaccess and also has mod_rewrite installed. Check with your web hosting company for these details.
The rewrite engine in Apache provides a number of ways to redirect traffic. Most people use the the normal redirect. When that happens, the URL in the location bar of your browser changes. There is also a proxy mode that doesn't change the location bar. When you use proxy mode, Apache inserts itself as a proxy between the user and the web site. It fetches the web page on the remote site and presents it as if it is local.
Here's what I did for my web site hosted by frii.com and my blog hosted by typepad.com. My .htaccess file looks like this:
RewriteEngine on
RewriteRule ^blog/(.*)$ http://blinne.blogs.com/blog/$1 [P]
RewriteRule ^blog$ http://blinne.blogs.com/blog/ [P]
RewriteRule ^/$ http://blinne.blogs.com/ [P]
RewriteRule ^$ http://blinne.blogs.com/ [P]
RewriteRule ^about.html$ http://blinne.blogs.com/about.html [P]
RewriteRule ^foaf.rdf$ http://blinne.blogs.com/foaf.rdf [P]
The structure of what I was mirroring looks like this:
http://blinne.blogs.com/about.html
http://blinne.blogs.com/index.foaf
http://blinne.blogs.com/blog/{the rest of the blog}
The first line turns the rewrite engine on.
Line 2 maps the entire subcontent under the directory blog. (.*) of the regular expression corresponds to $1 on the right hand side. From here on out, each line consists of a regular expression that matches a URI and a URL to map it to. The [P] at the end of each line tells Apache to proxy.
Line 3 handles the case http://www.blinne.org/blog without the trailing slash.
Line 4 handles the case http://www.blinne.org/
Line 5 handles the case http://www.blinne.org
Line 6 handles the case http://www.blinne.org/about.html
Line 7 handles the case http://www.blinne.org/index.foaf
I uploaded the .htaccess file into the top-level directory for my web site. Then,I went to the control panel for typepad and then to the domain map, lied about DNS working, mapped www.blinne.org to blinne.blogs.com, and finally activated it.
This is what it looked like on Typepad
And I am now running www.blinne.org on Typepad without remapping my DNS!
One last little note, you will get "charged" for the bandwidth both at the local and remote site. If that is a concern for you, DNS mapping is definitely the way to go.