the Future of the Web
  • Home
  • Articles
  • Contact
  • A URL is (maybe not) forever

    May 17 2007

    Last year, I wrote that A URL is forever. Well, like any good hypocrite, I went and changed my URLs yesterday.

    I used to have URLs like:

    /blog/2007/5/a-url-is-maybe-not-forever

    Originally I thought having the date in there would make my site more scalable, so in 100 years (ha!), I wouldn't have a problem of finding a unique URL for my blog posts. Yesterday, I decided I'd rather have shorter URLs and just make myself come up with unique URLs for my blog posts (a matter of taste, really). So now my URLs look something like this:

    /blog/a-url-is-maybe-not-forever

    So yes, my URLs weren't forever. But I didn't just change them all and break all the old URLs. No, the original URLs all still work. To do this, I added a 301 (permanent) redirect to my .htaccess file, like this:

    RewriteEngine on
    
    # need this forever
    RewriteCond %{REQUEST_URI} ^/blog/d{4}/d+/.+
    RewriteRule ^blog/d{4}/d+/(.*)$ http://www.thefutureoftheweb.com/blog/$1 [L,R=301]
    

    Now, for the life of this site, I have to support both styles of URLs (at least for all blog posts posted before today). That's a sacrifice I'll have make to have shorter URLs. And that's really what's important: once a URL is released into the wild, it should always bring someone to the page it originally referenced, even if the preferred URL for that page changes.

    Tags: web bad-practices hypocrisy url w3c
    View 3 Comments | Add a comment
  • Comments

    1. awflasher at 12:46am on May 18, 2007

    But.. However, the external links suffers a lot after the change of URL:(
    You have to redirect them once and once.
    What do u think of this ?

    2. Jesse Skinner at 5:11am on May 18, 2007

    Yep, that's the sacrifice I'll have to make. But it actually doesn't add much work, because every time I updated my 'about-me' page, I ended up with a new URL, eg. /blog/2006/4/about-me, etc. so I had redirects in place to bring people to my newest one anyway. Now, I've gotten rid of these and just have /blog/about-me. I think the separation of dates from the URL has its benefits.

    3. awflasher at 11:12am on May 21, 2007

    What about the Pagerank you will sacrifice ?
    will the 301 redirect a pr6 page to a pr0 page make sense that the pr0 page will get a pr6 in the next google dance ~?

    Add a Comment

    Note: HTML tags and entities will be converted so that they are displayed as you type them. This means if you type in <em>, people will see <em>, and if you type &lt;em&gt;, people will see &lt;em&gt;.

  • Request a Quote

  • Jesse Skinner

    Jesse Skinner
    • About Me
    • Email Me
    • RSS Feed RSS Icon
    • @JesseSkinner
  • Recent Articles

    • jQuery Live Events
    • I need web developers
    • buttons need type="submit" to submit in IE
    • Win $200 in a Web Dev Writing Contest
    • Use Arrays in HTML Form Variables
    • 5 Reasons Freelancers Can Succeed in a Shrinking Economy
    • Keeping a Live Eye on Logs
    • Using PHP's empty() Instead of isset() and count()
    • Testing Web Pages with Lynx
    • Stop CSS Background Flickering in Internet Explorer 6
    • See All...
  • Categories

    • javascript (39)
    • links (21)
    • about (19)
    • web (14)
    • html (12)
    • server (11)
    • css (8)
    • browsers (8)
    • carnival (7)
    • work (6)
    • design (4)
    • seo (4)
    • ads (4)
    • standards (4)
    • events (4)
  • Older Articles

    • February 2009
    • January 2009
    • December 2008
    • November 2008
    • October 2008
    • July 2008
    • June 2008
    • May 2008
    • April 2008
    • February 2008
    • January 2008
    • December 2007
    • November 2007
    • September 2007
    • August 2007
    • July 2007
    • June 2007
    • May 2007
    • April 2007
    • March 2007
    • February 2007
    • January 2007
    • December 2006
    • November 2006
    • October 2006
    • September 2006
    • August 2006
    • July 2006
    • June 2006
    • May 2006
    • April 2006
    • March 2006
    • February 2006
    • January 2006
    • December 2005
    • November 2005
    • October 2005
    • September 2005
    • August 2005
    • April 2005
    • See All...
Copyright © 2010 The Future of the Web