psst.. this blog is on hiatus.

Preventing image hotlinking: An improved tutorial

A few months ago, I wrote up a little tutorial on stopping hotlinking (or hot-linking, also known as bandwidth theft) called Selective hotlinking prevention through .htaccess”>”Selective hotlinking prevention through .htaccess.” The idea was simple: prevent random users from stealing bandwidth while allowing defined directories to be hotlinked, e.g. for posting images on a message board. The technique described in the previous entry is still valid, but I’d like to describe an improved and more efficient approach to hotlinking prevention.

Continue Reading »

Clean up Microsoft Word HTML

Microsoft Word generates terrible, sloppy, bloated, proprietary HTML. It’s ugly and near-impossible to hand-edit.

On a tip from Francois Jordaan, I Iearned of a handy way to coerce MS Word into generating decent markup. It’s the Office 2000 HTML Filter 2.0, which adds the File > Export To > Compact HTML… menu. The HTML generated with this function isn’t as clean as something that you or I, the hand-coding geeks of the world, would write, but it’s acceptable. Observe:

For the statistically inclined among you, that’s a 63% decrease from the standard to compact HTML versions.

Selective hotlinking prevention through .htaccess

Purpose of this dorky little tutorial

This tutorial describes how to selectively limit hotlinking on your website. You can block hotlinking of most of the images on your website, but allow certain directories to be hotlinked, since this can be useful for you (the website owner).

UPDATE: I’ve published an updated tutorial that improves upon the approach outlined here. I recommend it over this approach. See Preventing image hotlinking: An improved tutorial.

Continue Reading »

Apache Directory Indexes 201

After composing a cute little entry roughly 10 days ago describing how to sex up your Apache directory indexes, I came across some additional information this morning that doesn’t exactly invalidate my previous post but makes it seem amateurish. So I’ve renamed my previous guide to Apache indexes “101″ and called this new and improved primer (it slices, it dices!) the “201″ (advanced) version.

The big advantages of 201 over 101 include:

  • Ability to set the <title>,
  • Flexibility to have code in the <head>, and
  • Most importantly: the ability to integrate indexes quickly with your existing template system.

So with a bit of luck and a bit of resolve, here’s what your directory listings can eventually look like: Indexes 201 example listing

Continue Reading »

Apache Directory Indexes 101

Note: I have since published an update to this entry called Apache Directory Indexes 201. Please read it if you’re interested in a more flexible means of styling indexes.

With a tidbit from the Apache mod_autoindex documentation, I decided to give a little flair to my directory indexes. Usually, indexes are quite vanilla: unstyled HTML 3.2 with tab-delimited textual content enclosed in <PRE> tags.

I’m sure you know what I mean. Take a looksie at the directory listing of BLOGWARS, a sister site of underscorebleach.net: booooring directory listing

Now stand back and be amazed by underscorebleach.net’s directory listing: Indexes 101 directory listing

Continue Reading »

Slick URLs in Movable Type

If you’re a dorkwad like me, you might’ve looked at the jotsheet URLs and seen that there’s no extension there: no .html, no .php, no .shtml. Here, I can prove it: http://underscorebleach.net/content/jotsheet/2003/11/eu_budget

How do I do that? Good question. But first, you ask, why do I do that?

  1. It makes the URLs future-proof: if my server-side approach (currently SSI) changes to PHP, there’s no need to change the file extension on all the files. Also, the same URL can be bookmarked, and you don’t have to mess with redirecting old URLs in a big honkin’ .htaccess (if you’d even bother with that).
  2. Since Google
  3. It looks cool. Nerd power. Uhh yeah

So, since it might be of some use to another small-time nerd out there, I figure I’ll share my approach to extensionless blog entries in Movable Type. It takes a little bit of doing, but by the time you’re done, you’ll be the coolest blogger on the block.

Continue Reading »

Brown and orange

Every few months, you come across a simple fact that everyone but you seems to know. Such was the case for me last week. Who knew that brown pots were for caffeinated coffee and orange pots were for decaf? Evidently, everyone but me.

It started when I was making a fresh pot of regular coffee at work. John, who drinks regular, walked up to get some coffee, but saw that I was using the orange pot, so he assumed I was making decaf. “Aw, I need a cup of coffee—too bad you’re making decaf,” he says.
Continue Reading »