Twitter, TinyURL, Dots, Dashes, and My htaccess File

After a number of experiments and reading & participating in the twitter-development-talk mailing list, I can now tweet about updates to my pages without Twitter converting my URLs to TinyURLs. First, here's what I've learned about Twitter and TinyURLs:
If a URL path in a tweet contains only forward slashes (/), dots (.), and alphanumeric characters, Twitter does not convert the URL to a TinyURL.
I plan to start tweeting about pages when I update them and if a page's URL contains dashes, tweet it with the dashes replaced by dots. For example, the tweet about this blog item uses this URL:
The .htaccess file on my server includes this line:
RedirectMatch 301 ^/(2008/../[^.]*)\.([^.]*)\.([^.]*)\.([^.]*)\.([^.]*)\.([^.]*)$$1-$2-$3-$4-$5-$6
which redirects the URL to this:
which is the actual URL of the blog item. This way I maintain control of URLs that lead to my pages and TinyURL does not get to track and profile people who visit my pages via my tweets.

If you have a suggestion for a better way to do this, please post a comment. For example, I'm wondering if it would be better to use RewriteCond & RewriteRule rather than RedirectMatch in my .htaccess file. Some thoughts about this are inĀ WhenNotToUseRewrite in the Apache Documentation Wiki.

Labels: , , , , ,

Hashtag: # [?]

Post & Read Comments (located elsewhere)



Post & Read Comments (located here)

Post a Comment



Links to this page

Create a Link



Each item © Nancy McGough
Each comment © the author of the comment web site hosted by
deflexions powered by Delicious · reflexions powered by Blogger
More deflexions & reflexions, & feeds available via the sidebar top & bottom

[link] For bookmarks & links, please use this page's permalink [link]