So if you are reading this, then you have been successfully redirected to my new website on hostmysite.com. Congratulations!
The whole adventure was not without some complications and extra steps. Partly, it was the change of internet host. In addition, I was changing from Movable Type 4.21 to MT 4.23, from Microsoft IIS to Apache, and from Windows to Linux. All of these factors contributed.
- mt-config.cgi
A lot of the problems flowed from the new mt-config.cgi file. Every Movable Type site has a mt-config.cgi file which describes where the CGI/Perl files can be found, where the generated static HTML files should go, and what the IP/URL of the website is. I was previously using MT under Microsoft IIS, and it allowed certain configuration errors that will haunt me.
MT is designed to allow multiple blogs to share a single domain. Typically, your blog is rooted at http://www.domain.com/blogname/index.html. In my case, I had mine rooted at http://www.domain.com/index.html because I put the MT code and generated files into a directory hierarchy that omitted the blog name. Unfortunately, that is really not possible in a typical Linux installation, as far as I can tell.
Linux sites set up (interpreted, executable) CGI files under /cgi-bin/ and (static, uninterpreted) HTML files under /htdocs/. Thus, you end up with your mt-static directory moved under htdocs and everything else put under cgi-bin.
Everything would still be cool if either:
- I omitted the directory with the blog name (putting everything in the htdocs root) or
- I could find a way to configure mt-config.cgi to redirect to index.html without the blog name.
- Hard-coded iwebthereforeiam.com / missing blog name
Because of the change above, I could not have internal links that omitted the blog name. At a minimum, I had to change all these internal links. All of them used my domain name, so for simplicity, I just replaced the domain name with ../... That will work even if I someday discover a simple way to omit the blog name from URLs.
- Move static HTML/ASP files
Because of laziness, I had placed many files into the root of my configuration. In most cases, it was easier to just put them into a new directory /htdocs/files/. In like fashion, I ended up adding some other directories to the root so that I did not go insane patching my entire site:
- /files/
- /images/
- /projects/
- /sounds/
- /styles/
- Fix Movable Type templates
I have a bunch of CSS and JavaScript packages on my site that have to be added to parts of the MT templates in order to flow through directly:
- google-analytics
- code coloring with prettify.js and prettify.css
- snapshots from snap.com
- blockquote.quote
I would have followed the instructions I posted some months ago for this, but MT 4.23 has removed some templates and added others, so I ended up figuring it out from scratch again. The gist of it is that anywhere that MT generates a head section, I needed to include the CSS and JS files, and anywhere that MT generates a body section, I needed to add an onload setting. The color coding involved adding the CSS and JavaScript inclusions to HTML Head:
<link rel="stylesheet" href="/mt-static/css/prettify.css" type="text/css" /> <script type="text/javascript" src="/mt-static/js/prettify.js"> </script>
and then adding onload="prettyPrint();" to the body element of these templates:
- Search results
- Comment Preview
- Category Entry Listing
- Entry
- Monthly Entry Listing
- Page
Setting up google analytics and snap.com involved making modifications to the bottom of the template Banner Footer. I still have not got blockquote.quote in extra.css working.
- Add banned sites using mt_ipbanlist
I have a huge collection of banned spammers from my previous site. I was not going to let them start spamming my trackbacks again, so I have to insert all these IP addresses into the MySQL table mt_ipbanlist. This will be a bit of a pain. I'll probably write a python script that does the insertions and upload the script to MySQL and let it chew on that for awhile. I imagine that must be how I did it before.
- Rewrite ASP pages
SInce I was under Microsoft IIS for so long, I have old ASP pages that will have to be rewritten, probably in PHP. I'll have to evaluate why they had to be ASP (i.e. interpreted/dynamic ) in the first place.
- Redirect name servers
This was the final step in throwing the switch. Once I did this, web surfers could find my new site with the old domain name. I had to add in an HTML file with a redirect to deal with the absence of the blog name:
<html> <head> <meta HTTP-EQUIV="REFRESH" content="3; url=http://www.iwebthereforeiam.com/iwebthereforeiam/index.html"> </head> <body><p>Redirecting to <a href="http://www.iwebthereforeiam.com/iwebthereforeiam/index.html">new blog location</a> in 3 seconds.</p></body> </html>
- Alert the search engines
Because of the addition of the blog name to the middle of the URL, most all URLs in the search engines are now bad. Sigh. So I have to resubmit my site for spidering.
Update 2009-01-09: Unbelievable. The whole problem with the blockquote.quote style in extra.css was that the file began with a C++-style comment and the entire file was interpreted as if it was commented out. Some sort of Unix versus Windows/LF versus CR-LF issue. Totally resolved by taking out the comment.

Leave a comment