A short URI on Amazon.com for our book

I am impressed! I wasn’t aware that such things did exist… Amazon.com has been kind enough to give us a short URI for our book Professional Web 2.0 Programming. This URI is http://www.amazon.com/web2-0thebook/.

This is a short and cool URI indeed and if, being a cool URI, it doesn’t change our book will always remain THE Web 2.0 book for Amazon.com!

However, as I pasted it my Web browser, I noticed that this short and cool URI was immediately replaced by http://www.amazon.com/Professional-Web-Programming-Eric-Vlist/dp/0470087889/.

Being suspicious, I tried:

vdv@grosbill:/tmp $ curl -D - -A  "Mozilla/4.0"  http://www.amazon.com/web2-0thebook/
HTTP/1.1 301 Moved Permanently
Date: Fri, 17 Nov 2006 21:05:22 GMT
Server: Server
Set-Cookie: skin=; domain=.amazon.com; path=/; expires=Wed, 01-Aug-01 12:00:00 GMT
Location: http://www.amazon.com/Professional-Web-Programming-Eric-Vlist/dp/0470087889/
Vary: User-Agent
Content-Length: 0
Content-Type: text/plain
nnCoection: close

A 301 HTTP response code! This code is meant for obsolete resources:

10.3.2 301 Moved Permanently

The requested resource has been assigned a new permanent URI and any future references to this resource SHOULD use one of the returned URIs. Clients with link editing capabilities ought to automatically re-link references to the Request-URI to one or more of the new references returned by the server, where possible. This response is cacheable unless indicated otherwise. The new permanent URI SHOULD be given by the Location field in the response. Unless the request method was HEAD, the entity of the response SHOULD contain a short hypertext note with a hyperlink to the new URI(s).

Amazon.com have given us an obsolete URI! I would have much preferred a 302 (FOUND) which seems to be exactly our situation, a 303 (See Other) or even a 307 (Temporary Redirect) since none of these codes carries this meaning of a URI that should no longer be used.

I was also wondering if this URI can be used with Amazon partners tags and I tried:

vdv@grosbill:/tmp $ curl -D - -A  "Mozilla/4.0" http://www.amazon.com/web2-0thebook/?tag=<mytag>
HTTP/1.1 301 Moved Permanently
Date: Fri, 17 Nov 2006 21:07:28 GMT
Server: Server
Set-Cookie: skin=; domain=.amazon.com; path=/; expires=Wed, 01-Aug-01 12:00:00 GMT
Location: http://www.amazon.com/Professional-Web-Programming-Eric-Vlist/dp/0470087889/
Vary: User-Agent
Content-Length: 0
Content-Type: text/plain
nnCoection: close

There might other solutions, but the answer seems to be “no”: the query string is stripped during the redirect and the cookie which is set doesn’t carry this information either. This means that when we use this short URI, we are not treated as Amazon.com affiliated sites.

Anyway, I shouldn’t be that picky! Thanks Amazon.com, this is a short and cool URI even if its implementation could be improved :) …

Share and Enjoy:
  • Identi.ca
  • StumbleUpon
  • del.icio.us
  • Facebook
  • Twitter
  • Add to favorites

One thought on “A short URI on Amazon.com for our book”

  1. Ouch. Bittersweet.
    I guess the question is, should you publish “www.amazon.com/web2-0thebook/” as they might someday change their redirect even though you won’t be changing your desire to see it redirect? Also, rather a PITA that it doesn’t support their affiliate program. {Sigh} You just can’t always get what you want… Especially when you are dealing with a behemoth (even though you should be able to in this case.)

Leave a Reply

Your email address will not be published. Required fields are marked *

Enter your OpenID as your website to log and skip name and email validation and moderation!