psst.. this blog is on hiatus.

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.

(more…)

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

(more…)

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

(more…)