{"id":6239,"date":"2004-10-04T14:00:41","date_gmt":"2004-10-04T21:00:41","guid":{"rendered":"http:\/\/hill-kleerup.org\/blog\/wp\/2004\/10\/04\/mt-dynamic-publishing-notes-yet-again.html"},"modified":"2004-10-04T14:00:41","modified_gmt":"2004-10-04T21:00:41","slug":"mt_dynamic_publ","status":"publish","type":"post","link":"https:\/\/hill-kleerup.org\/blog\/2004\/10\/04\/mt_dynamic_publ.html","title":{"rendered":"MT dynamic publishing notes (yet again)"},"content":{"rendered":"<p>Okay, here&#8217;s the good news:  I figured out what was wrong with the dynamic publishing options I had set for my main blog (this one). <\/p>\n<ul>\n<li>In my IDC blog (<em>\/blog\/idc\/<\/em>), the <em>.htaccess<\/em> references to <em>mtview.php<\/em> work when written as <em>&#8220;\/public_html\/blog\/idc\/mtview.php&#8221;<\/em>.  Indeed, I had to explicitly <u>add<\/u> the \/public_html\/ directory at the top.\n<li>In my main blog (<em>\/blog\/,<\/em> but with archives at \/blog\/mtarchive\/), the <em>.htaccess<\/em> references to <em>mtview.php<\/em> only work when written as <em>&#8220;\/blog\/idc\/mtview.php&#8221;<\/em>.  Prefixing them with <em>\/public_html\/<\/em> does <u>not<\/u> work.<\/ul>\n<p>Go figure.<\/p>\n<p>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 &#8230;<\/p>\n<p>&#8230; well, that&#8217;s another interesting complication.  I&#8217;ve been making heavy use of SSI (server-side includes) in my templates.  That lets the page be loaded semi-dynamically &#8212; blocks of code that (e.g., a list of sidebar pictures) that is fixed doesn&#8217;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 &#8230;<\/p>\n<p class=\"block\">&lt;!&#8211;#include virtual=&#8221;\/blog\/blockoftexttoinsert.txt&#8221;&#8211;&gt;<\/p>\n<p>&#8230; in your template, and, hey presto, the server inserts it.  And if you don&#8217;t want to have all your files end in <em>.shtml<\/em>, you can just add &#8230;<\/p>\n<p class=\"block\">AddHandler server-parsed .html .htm<\/p>\n<p>&#8230; into your <em>.htaccess<\/em> file to tell it to have the server parse <em>.html<\/em> and <em>.htm<\/em> files as though they were <em>.shtml<\/em> files.  (Note: the above is what works on my server&#8217;s particular configuration.  Check with your ISP for more info.)  Very significant disk storage savings are possible this way.<\/p>\n<p>Problem is, dynamically generated MT pages (via <em>mtview.php<\/em>) don&#8217;t support SSI in that fashion.  There is no <em>.html<\/em> file involved (even if that&#8217;s how you&#8217;ve defined your archive files&#8217; extensions); looking for the <em>.html<\/em> file just causes <em>mtview.php,<\/em> once the file isn&#8217;t found, to generate it directly to your browser with that name.<\/p>\n<p>So &#8230; for all dynamic archive templates that use SSI, I need to go back and remove those <em>#include<\/em> statements and put in <em>MTInclude<\/em> statements instead.  Static templates can keep the <em>#include<\/em> statements, if it&#8217;s worthwhile (the disk savings plummit, and the load time increases a scosh).<\/p>\n<p>(Btw, this is a <a href=\"http:\/\/www.elise.com\/mt\/archives\/000733htaccess_and_dynamic_publishing.php\" target=\"_blank\">fine article on the .htaccess stuff and dynamic publishing<\/a>.)<\/p>\n<p>In the meantime, though, I have to use the older <em>.htaccess <\/em>file in the root of my main blog because all the funky dynamic publishing <em>.htaccess<\/em> code seems to override the AddHandler code, even if the file is actually found.  Which means I&#8217;ll probably end up removing all the server-side includes in my regular index templates, too.  I&#8217;m sure there&#8217;s a way to tweak the <em>.htaccess<\/em> code, but it&#8217;s beyond me without more research.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Okay, here&#8217;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\/),&#8230;<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_seopress_titles_title":"","_seopress_titles_desc":"","_seopress_robots_index":"","_seopress_robots_follow":"","_seopress_robots_imageindex":"","_seopress_robots_snippet":"","_seopress_robots_primary_cat":"","_seopress_robots_breadcrumbs":"","_seopress_robots_freeze_modified_date":"","_seopress_robots_custom_modified_date":"","_seopress_robots_canonical":"","_seopress_social_fb_title":"","_seopress_social_fb_desc":"","_seopress_social_fb_img":"","_seopress_social_fb_img_attachment_id":0,"_seopress_social_fb_img_width":0,"_seopress_social_fb_img_height":0,"_seopress_social_twitter_title":"","_seopress_social_twitter_desc":"","_seopress_social_twitter_img":"","_seopress_social_twitter_img_attachment_id":0,"_seopress_social_twitter_img_width":0,"_seopress_social_twitter_img_height":0,"_seopress_redirections_value":"","_seopress_redirections_enabled":"","_seopress_redirections_enabled_regex":"","_seopress_redirections_logged_status":"","_seopress_redirections_param":"","_seopress_redirections_type":0,"_seopress_analysis_target_kw":"","_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[3],"tags":[],"class_list":["post-6239","post","type-post","status-publish","format-standard","hentry","category-blogging"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack-related-posts":[{"id":6272,"url":"https:\/\/hill-kleerup.org\/blog\/2004\/09\/29\/dynamic_publish.html","url_meta":{"origin":6239,"position":0},"title":"Dynamic publishing in MT3","author":"***Dave","date":"Wed 29-Sep-04 9:52am","format":false,"excerpt":"One of my major reasons for taking the MT 3.11 plunge is the prospect of dynamic publishing -- that a blog page gets rendered on the fly when you go...","rel":"","context":"In &quot;Blogging &amp; Internet&quot;","block_context":{"text":"Blogging &amp; Internet","link":"https:\/\/hill-kleerup.org\/blog\/category\/blogging"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":6270,"url":"https:\/\/hill-kleerup.org\/blog\/2004\/09\/29\/mt3_dynamic_pub.html","url_meta":{"origin":6239,"position":1},"title":"MT3, dynamic publishing, and SmartyPants","author":"***Dave","date":"Wed 29-Sep-04 11:59am","format":false,"excerpt":"SmartyPants is a text modifier that can be used to turn straight quotes to \"curly quotes\", dashes to em-dashes -- as they say -- dots to ellipses ... etc. I've...","rel":"","context":"In &quot;Blogging &amp; Internet&quot;","block_context":{"text":"Blogging &amp; Internet","link":"https:\/\/hill-kleerup.org\/blog\/category\/blogging"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":13760,"url":"https:\/\/hill-kleerup.org\/blog\/2009\/02\/17\/converting-from-movable-type-to-wordpress.html","url_meta":{"origin":6239,"position":2},"title":"Converting from Movable Type to WordPress","author":"***Dave","date":"Tue 17-Feb-09 9:22am","format":false,"excerpt":"Okay, here's my stab at what I did and why. This is a conversion from a Movable Type 4.01 blog (set up with dynamic publishing for everything except the index.html) to WordPress 2.7. Of course, you should check out the documentation on installation, starting here, most specifically the standard installation\u2026","rel":"","context":"In &quot;Blogging - Technical&quot;","block_context":{"text":"Blogging - Technical","link":"https:\/\/hill-kleerup.org\/blog\/category\/blogging\/blogging-technical"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":11897,"url":"https:\/\/hill-kleerup.org\/blog\/2008\/01\/05\/installing_movable_type_4.html","url_meta":{"origin":6239,"position":3},"title":"Installing Movable Type 4","author":"***Dave","date":"Sat 5-Jan-08 8:03pm","format":false,"excerpt":"I'm going to use this post to keep track of my MT4 installation.\u00a0 The good folks at Hosting Matters (who are probably sick and tired of my site sucking...","rel":"","context":"In &quot;Blogging &amp; Internet&quot;","block_context":{"text":"Blogging &amp; Internet","link":"https:\/\/hill-kleerup.org\/blog\/category\/blogging"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":8898,"url":"https:\/\/hill-kleerup.org\/blog\/2006\/03\/28\/protecting_your.html","url_meta":{"origin":6239,"position":4},"title":"Protecting your image (with .htaccess)","author":"***Dave","date":"Tue 28-Mar-06 6:56am","format":false,"excerpt":"As part of tracking the current spam problem (and the changes I made to the MT cgi directory yesterday did abruptly cut off all the error log messages -- and,...","rel":"","context":"In &quot;Blogging &amp; Internet&quot;","block_context":{"text":"Blogging &amp; Internet","link":"https:\/\/hill-kleerup.org\/blog\/category\/blogging"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":11553,"url":"https:\/\/hill-kleerup.org\/blog\/2007\/08\/03\/movable_type_woes.html","url_meta":{"origin":6239,"position":5},"title":"Movable Type woes","author":"***Dave","date":"Fri 3-Aug-07 3:07pm","format":false,"excerpt":"Okay, so here's the scoop.\u00a0 Sometime after things get actually saved into database (posts, comments), but before the rebuild occurs or is completed, the process errors out: The site error...","rel":"","context":"In &quot;Blogging &amp; Internet&quot;","block_context":{"text":"Blogging &amp; Internet","link":"https:\/\/hill-kleerup.org\/blog\/category\/blogging"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"_links":{"self":[{"href":"https:\/\/hill-kleerup.org\/blog\/wp-json\/wp\/v2\/posts\/6239","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/hill-kleerup.org\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/hill-kleerup.org\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/hill-kleerup.org\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/hill-kleerup.org\/blog\/wp-json\/wp\/v2\/comments?post=6239"}],"version-history":[{"count":0,"href":"https:\/\/hill-kleerup.org\/blog\/wp-json\/wp\/v2\/posts\/6239\/revisions"}],"wp:attachment":[{"href":"https:\/\/hill-kleerup.org\/blog\/wp-json\/wp\/v2\/media?parent=6239"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/hill-kleerup.org\/blog\/wp-json\/wp\/v2\/categories?post=6239"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/hill-kleerup.org\/blog\/wp-json\/wp\/v2\/tags?post=6239"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}