Subscription: Absolutely free!
What Would Jesus Buy? A Nintendo Wii for His apostles' down time, me thinks. ›
$25,000 dessert? I bet it tastes like crap. ›
Coal miner. I'm speechless. And he's smoking. ›
Broken camera. Would you get yours fixed? ›
GlassBooth. Sorting through candidate positions broken down by category. Very cool tool. ›
Black-OPs bunny. This is just wrong. Gotta love the Internet. ›
Montecito residence. Beautiful lines, spacious interior, slightly Mad Max'ish (which can be a good thing). ›
An (obviously) old Iraqi banknote. Saddam seems to happy. ›
I know some people that swear by Olive Garden's superb food. I'm not one of them. They're okay, not great. But at least we can now all agree, their food is fattening as hell. ›
The ghosts are here, at least in Thailand. Worth watching just for the weird factor alone. ›
"Do Not Call" violators seriously violated. Muahaha. ›
Qi Zhong Stadium in Shangai, hosting the Tennis Masters, opens up like a flower. Amazing! ›
Breaking down the history of Pentagram. Thank you Curtis. ›
"Why do so many companies risk destroying their design heritage - one of their most valuable assets?" Fear of risking being, oh, how do you say, unique? [do] ›
Decca. A lovely vinyl sleeve. ›
Said elsewhere:
By month:
September 26, 2007
That was fun. I’ll be the first to admit I do not consider myself a programmer when it comes to setting up platforms like Movabletype or Drupal, which lately I’ve found to be completely engrossed. It’s taught me many new things, not the least of which is patience.
Let’s start roughly a month ago, when I thought I successfully ported Everomp over to Dreamhost. My previous provider ended up really sucking. And I mean that. They actually disabled my MT scripts at one point, claiming I ran an old version which ran several security risks. Bullshit. Unfortunately it took me several attempts to get their attention. Bottom line, it was time for a change.
Things were running smoothly on my new server, until I suddenly started receiving Internal Server Errors when trying to post a new article. Strangely, the article would populate just fine, however I’d have to run into that error every time. So I’m faced with a choice:
Neither choice filled my heart with warmth. I decided to bite the bullet and fix it.
I contacted Dreamhost support, with no luck. They don’t support MT, thus can’t give concrete answers. No problem. I accept that. They advised I seek some answers on the Dreamhost forums. I did. It helped. Obviously, I’d have to reinstall MT.
I won’t go into bloody details, but I ended up scratching everything and installing MT4 from scratch. I imported Everomp’s database and tried adding my old templates. Oops, apparently much has changed in the templating world of MT. The templates have improved quite a bit, however I had a bitch of a time converting Everomp.
Keep in mind I haven’t had a large amount of free time to pursue this in months. This whole process was completed in chunks of 30 minutes each. I hate working this way, but it’s the only option I had.
My last problem really threw me a blow. I had originally set up Cruft-Free URLs. Why? Because design matters everywhere: from the header to how the URLs are displayed. When somebody looks at a URL within Everomp, I want them to be able to read it, not just look. It should tell them where they are, how deep they’ve gone, and just what the hell’s going on. While there are those that argue file extensions are just as important in a URL, I’m not of that belief. I think the majority of those who visit Everomp honestly don’t care if they are viewing my content in HTML or PHP. However, it is important to keep the file extensions intact on the server, for the sole purpose of the author knowing just what the hell he’s programming.
I originally followed Mark’s way of removing file extensions. Brilliant guide. Unfortunately it simply doesn’t work in MT4. For me at least. Maybe it does for you, but like I said, I’m not genius when it comes to hacking MT. I simply follow directions. From what I could tell, the problem lay in removing the file extension in Archive Mapping. I would get an error message when trying to repopulate. Okay, no go.
How do I remove the file extension from each link, and have the file present properly?
First, I used an old MT Plugin, Regex. There were conflicting articles about Regex now being fully integrated with MT4, and I really can’t tell what’s what. I installed it nevertheless.
Keeping the file extensions intact in Archive Mapping, every permalink received this treatment:
<$MTEntryLink regex="s/\.html$//"$>
This could be the part where I explain how exactly this cuts off the file extension, but I simply don’t know. Bottom line, it works. Luckily you aren’t here for explanations, just answers.
Okay, now that each entry link has its limb chopped off, we have to tell the system to handle any files without extensions as .html. The best solution I found is to modify the root .htaccess file. Also, for this to work you need to make sure the Apache module mod_rewrite is installed. (Whatever that means)
RewriteEngine on
RewriteCond %{REQUESTFILENAME} !-d
RewriteCond %{REQUESTFILENAME}.html -f
RewriteRule ^(.*)$ $1.html
So now we have it set up where MT populates our site with .html files, however direct links remove the file extension, and a few lines of code forces the system to display an extension-less file properly. So far, this works out just fine for me.
But let’s take it one step further. Am I the only one that cringes at those long URLs based on long entry titles? Probably not. So how can we fix that? How can we get complete control over the file name itself? Thanks to Mike for a genius solution.
In the Archive Mapping path, use <mt:EntryKeywords /> as your file name. Then for each entry simply enter your own title in the Keywords category under METADATA. Brilliant.
So there you have it. One way to remove file extensions (and create custom file names) in MT4.
Articles related to removing file extensions, each of which I couldn’t have done it without:
That’s about all I could find. If there are more articles related to the subject, let me know. This is just one solution, and probably not the best.
Somebody Might Say: