In my day job I’m a front end web geek. Roughly that means that I concentrate on things like communications strategy (Yes, really, we should communicate with our donors on a more regular basis than ‘whenever we remember to do so’), web standards, and accessibility. Yesterday I rolled out a new look and feel and a new information architecture for a site that, well, looks like it was built by a bored 15 year-old…in 1997. Oh the unclosed tags! Oh the nested tables! Oh the images displayed at incorrect sizes!
The best thing about this, though, is I got to play with the .htaccess file and let me just say that it redirect 301 is the coolest thing since sliced bread.
No more “empty” html files with meta redirect tags that trap the user in a 0 second loop trying to use the browser back to see what was on that page that just flashed in front of her face. No more “if this page doesn’t automatically reload please go here” messages. Just an elegant simple command that makes the server invisibly do the work.
Made me dance in my chair, it really did.
Oh, yes, .htaccess is the spackle that lets us move current sites. It’s also useful for spurning referral link spamming or blocking entire domains.
What I don’t like about it is how fickle the file can be. I tried to add this:
Order Deny,Allow
Deny from All
so people (robots) still referring to my cgi scripts get blocked. It worked on one site, but not my primary one, possibly interfering with a previous directive. Apache is unforgiving of errors.
Ah, sorry, I forgot your thing doesn’t accept literals. Wrapped around the Order and Deny are:
<FileMatch “\.cgi$”>
and
</FileMatch>