Posts Tagged 'link'

Updated URL shortening rewrite

Something I’d meant to do since the day I did it was to add the rewrite rule so that I could exclude the l? from URL shortened links my social bookmarker generated. (I had been repeatedly poked for leaving this out too) The original idea->implementation was 30 minutes, so this takes it up to 35 minutes for the project, and only took a few months to implement. My entire .htaccess including the WordPress business is:

RewriteEngine On
RewriteRule ^([a-zA-Z0-9]{3,3})$ l.php?$1 [L]
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]

And everything seems to be working as it should. That brings me up to 122 characters for the messages that accompany my URLs!

Recent Photos

Red List’s Species of the Day