rc3.org

Since 1998.

rc3.org header image 1

Dynamic Main Indexes with Movable Type

July 28th, 2005 · 4 Comments

So I posted a question on the Movable Type community forum and thought I’d link to it here. The question is, how do you map the server root URL to the Main Index in Movable Type if you’re using dynamic publishing for that page?

If you publish a static file for the Main Index under the name recognized by the Web server as a directory index, then there’s no problem if someone goes to a URL like http://rc3.org/. However, if you are dynamically publishing that page, then no directory index is found and mtview.php tries to load the template associated with /. Since no such template exists, it returns an error.

The options to deal with this are:

  • Hacking mtview.php to map the URL / to the Main Index.
  • Creating a Movable Type template that maps to /. (I’m not sure whether this will work given that / is not a valid file name.)
  • Add a redirect to .htaccess to redirect people from / to the index.

Is there a preferred solution to this problem in the Movable Type community?

4 responses so far ↓

  • 1 James E. Robinson, III // Jul 29, 2005 at 7:19 am

    Can you just symlink mtview.php to index.php ? Either it’ll work, or it’ll confuse it…just a thought.

  • 2 Rafe // Jul 29, 2005 at 12:31 pm

    I fixed this problem but then I wound up with a static main index anyway just to speed things up a bit. Go figure.

  • 3 Basil Crow // Jul 30, 2005 at 2:18 pm

    How’d you fix it?

  • 4 Rafe // Jul 30, 2005 at 5:23 pm

    I posted the solution to the discussion topic that I linked to from the entry. Basically I hacked mtview.php so that it treats “/” as “/index.php”.

Leave a Comment

You can comment using OpenID:

Or you can just enter your personal information and comment that way. Your email address is required but won't be displayed.

Please enter your comment. Markdown is supported.