Dark Knight Cash Cow

After setting all sorts of records opening weekend records with $158M, The Dark Knight had a solid second week rising to a combined $314M.  This means that Batman is currently holding the 23rd position of highest grossing movies of all time – after 2 weeks.  Another week should place it in the top 10 and gunning for the #2 spot (Star Wars $460M) in its first month.  The mighty Titanic still has some breathing room at $600M and it will be interesting to see if DK has the staying power to knock off the “king of the world”.  Here’s hoping.

Guide to .htacess Redirect Same File Type To Same Domain

I’m adding this guide to my site since it apparently doesn’t exist on the web yet (odd as that seems).  .htaccess files are great and handy but the online info about them is sketchy at best.  Everyone seems to have the same 5 examples on their page, copied verbatim from someone else’s site without any extra explanation.

So here was my quandry…

It’s well known how to redirect single pages (note the first option is the page being moved and is a relative location from the main domain directory while the second option is the absolute location to the new file – even if it is the same domain):

Redirect 301 /oldpage.html http://www.domain.com/newpage.html
Redirect 301 /oldpage2.html http://www.domain.com/newpage2.html
Redirect 301 /oldpage3.html http://www.domain.com/dir/
Redirect 301 /oldpage4.html http://www.domain.com/dir/newpage4.html

Or whole sites:

 Redirect 301 / http://www.newdomain.com/

But if you want to do a certain type of files (like all .html files but not every file on the domain) it gets trickier.  Your fine if you want to change servers:

RedirectMatch (.*)\.gif$ http://www.newdomain.com$1.gif

Or change file types:

RedirectMatch 301 /(.*)\.htm$ http://www.domain.com/oldsite/$1.html

But if you want to simply redirect old site links to a folder/directory on the same site you quickly will discover a problem with endless loops as the somefile.html redirect to /dir/somefile.html will keep getting redirected resulting in a url with /dir/dir/dir/dir/dir/dir/dir/….

[ This will result in a endless loop ]

RedirectMatch 301 /(.*)\.html$ http://www.domain.com/oldsite/$1.html

Since most people online are passing on magic code they really don’t understand, the syntax can take a while to understand. So here is the code you need to make it work:

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_URI} !^/dir(.*)
RewriteRule ^(.*)\.html$ http://domain.com/dir/$1.html [R=301,NC,L]
</IfModule>

The <if> isn’t necessary but good programming. This doesn’t redirect if the directory name is in the url already.  The R=301 is the redirect code. The NC makes capitialization not matter.  And the L makes it quit at that point (if you have other rewrite options). Enjoy and thank the apache gods it didn’t take 3 hours of useless googling to figure this out.

Chattanooga Dam Triathlon

Well after much preparation and with much prayer support against cramping the day is here!  Put up or shut up time.  My goals this race were 1) finish 2) finish without crawling 3) finish sub 4 hrs.  So call it a trifecta!

  • 1.5k Swim –  35:25
  • Transition 1 – 5:50
  • 42k Bike –  1:37:30
  • Transition 2 – 3:00 – estimate, split was lost due to equipment failure and was included in run time
  • 10k Run – 1:15:41
  • TOTAL – 3:37:26

The crazy thing about this race was the driving rain during a portion of the biking.  Skinny road bike tires have minimal to nonexistent tread.  And hydroplaning at over 30 mph is not something you want to do before a 10k run assuming your bike survives the wipe out.  This kept me at nearer to 25mph instead of 35-40 on a few of the larger hills which added a bit to my time.  But at least I avoided serious injury and there is always next year.

Last Ride

Today is my last ride before race day.  It was a short course just to keep loose and not lose ground without tearing down.

  • Bike 9.76 miles – 41:42 (14mph, 442 cals) Hilly course