Take advantage of dynamic publishing
This morning, I switched my journal over to dynamic publishing. That means no more rebuilding, which is a godsend. I have over 1,000 entries in the journal, and rebuilding takes forever when I make a template change. That’s now a thing of the past.
The migration is straightforward as long as you don’t use too many Perl plug-ins in your templates. Luckily, the plug-ins I use, namely Markdown, SimpleComments, and SmartyPants have all been ported over to PHP. I do use a couple of Plugins that haven’t been ported, but I worked around it. I’ll have to wait for Amputator, Compare, and Columnize to get an update.
For Dreamhost users, you do have to modify the default .htaccess file present in the MT documentation. You need to change the line:
RewriteRule ^(.*)$ /mtview.php [L,QSA]
to a modified version:
RewriteRule ^(.*)$ http://yoursite.com/blog/mtview.php [L,QSA]
You also need to change the error section:
<ifmodule !mod_rewrite.c>
# if mod_rewrite is unavailable, we forward any missing page
# or unresolved directory index requests to mtview
# if mtview.php can resolve the request, it returns a 200
# result code which prevents any 4xx error code from going
# to the server's access logs. However, an error will be
# reported in the error log file. If this is your only choice,
# and you want to suppress these messages, adding a "LogLevel crit"
# directive within your VirtualHost or root configuration for
# Apache will turn them off.
ErrorDocument 404 /mtview.php
ErrorDocument 403 /mtview.php
</ifmodule>
Here’s the custom version:
<ifmodule !mod_rewrite.c>
# if mod_rewrite is unavailable, we forward any missing page
# or unresolved directory index requests to mtview
# if mtview.php can resolve the request, it returns a 200
# result code which prevents any 4xx error code from going
# to the server's access logs. However, an error will be
# reported in the error log file. If this is your only choice,
# and you want to suppress these messages, adding a "LogLevel crit"
# directive within your VirtualHost or root configuration for
# Apache will turn them off.
ErrorDocument 404 http://yoursite.com/blog/mtview.php
ErrorDocument 403 http://yoursite.com/blog/mtview.php
</ifmodule>
Also, dynamic caching is great. Take advantage of it. My blog is very zippy when using caching and it now I don’t have to deal with rebuilds.
1 comment
(1 year, 11 months ago)
Cool, you might be interested in this htaccess example..
http://www.askapache.com/2006/htaccess/ultimate-htaccess-file-sample.html