Newest
PRIVACYANDSECURITY
Bookmarks
- More than 10,000 bookmarks at http://Del.icio.us/Deflexion.com/PRIVACYANDSECURITY
-
Subscribe to
PRIVACYANDSECURITY
deflexions
or all
deflexions
Newest
PRIVACYANDSECURITY
Blog Items
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 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.
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:
http://deflexion.com/2008/03/twitter.tinyurl.dots.dashes.and.myThe .htaccess file on my server includes this line:
RedirectMatch 301 ^/(2008/../[^.]*)\.([^.]*)\.([^.]*)\.([^.]*)\.([^.]*)\.([^.]*)$ http://deflexion.com/$1-$2-$3-$4-$5-$6which redirects the URL to this:
http://deflexion.com/2008/03/twitter-tinyurl-dots-dashes-and-mywhich 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.
Libellés : htaccess, privacyandsecurity, regularexpressions, tinyurl, twitter, urls
Each item © Nancy McGough
Each comment © the author of the comment
Deflexion.com web site hosted
by DreamHost.com
←
More deflexions & reflexions, & feeds
available via the sidebar
top
&