Okay, here’s the good news: I figured out what was wrong with the dynamic publishing options I had set for my main blog (this one).
- In my IDC blog (/blog/idc/), the .htaccess references to mtview.php work when written as “/public_html/blog/idc/mtview.php”. Indeed, I had to explicitly add the /public_html/ directory at the top.
- In my main blog (/blog/, but with archives at /blog/mtarchive/), the .htaccess references to mtview.php only work when written as “/blog/idc/mtview.php”. Prefixing them with /public_html/ does not work.
Go figure.
Note that things are marginally complicated by my having an archives directory in MT. That means I need to have that dynamic publishing .htaccess code in both the archives directory and the main directory. Except …
… well, that’s another interesting complication. I’ve been making heavy use of SSI (server-side includes) in my templates. That lets the page be loaded semi-dynamically — blocks of code that (e.g., a list of sidebar pictures) that is fixed doesn’t need to be repeated across umpteen thousand individual archives, but can be stored as a single file (MT lets you do this by defining an output file) and then inserted dynamically by the server. You simply include the code …
<!–#include virtual=”/blog/blockoftexttoinsert.txt”–>
… in your template, and, hey presto, the server inserts it. And if you don’t want to have all your files end in .shtml, you can just add …
AddHandler server-parsed .html .htm
… into your .htaccess file to tell it to have the server parse .html and .htm files as though they were .shtml files. (Note: the above is what works on my server’s particular configuration. Check with your ISP for more info.) Very significant disk storage savings are possible this way.
Problem is, dynamically generated MT pages (via mtview.php) don’t support SSI in that fashion. There is no .html file involved (even if that’s how you’ve defined your archive files’ extensions); looking for the .html file just causes mtview.php, once the file isn’t found, to generate it directly to your browser with that name.
So … for all dynamic archive templates that use SSI, I need to go back and remove those #include statements and put in MTInclude statements instead. Static templates can keep the #include statements, if it’s worthwhile (the disk savings plummit, and the load time increases a scosh).
(Btw, this is a fine article on the .htaccess stuff and dynamic publishing.)
In the meantime, though, I have to use the older .htaccess file in the root of my main blog because all the funky dynamic publishing .htaccess code seems to override the AddHandler code, even if the file is actually found. Which means I’ll probably end up removing all the server-side includes in my regular index templates, too. I’m sure there’s a way to tweak the .htaccess code, but it’s beyond me without more research.
Is it live, or is it Memorex?
Or, more properly, is this a static web page, or a dynamic one?
It’s now (huzzah!) a dynamic one. And some very crude testing indicates that the load time on the dynamic individual archives is only trivially slower (if at all) from the static individual archives. (The category and monthly archives are distinctly slower, though not beyond the pale.)
Now, if this comment posts, I’m going to declare victory.