Apr
22
Filed under: Asides | April 22nd, 2007

Random Redirect Plugin

I wrote a quickie plugin based on an idea from Techcrunch, when you visit the URL it redirects you to a random post from your blog.

Possibly related posts:

  1. Random Redirect Plugin I just updated the  Random Redirect plugin, with two extra...
  2. Art Direction Plugin WordPress “Art Direction” Plugin, from Automattician Noel Jackson. Basically allows...
  3. 4,000 Plugins WordPress.org plugin directory just reached its 4,000th plugin! I declare...
  4. Plugin Competition The WordPress plugin competition at WLTC is now open for...

6 Responses

  • Avinash | April 22nd, 2007 @ 10:56 pm | Reply

    Sounds cool! I saw it working live @ TechCrunch. I’m gonna give it a try on my blog.

    - Avi

  • Jeff | April 23rd, 2007 @ 9:31 am | Reply

    It looks like (according to Live HTTP headers) that you are using a 301 moved permanently. You might want to consider 303 See Other instead.

    From RFC 2616 re 301:
    “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.”

    That doesn’t seem like the right thing for a random redirect.

    re 303:
    “The response to the request can be found under a different URI and SHOULD be retrieved using a GET method on that resource. This method exists primarily to allow the output of a POST-activated script to redirect the user agent to a selected resource. The new URI is not a substitute reference for the originally requested resource.”

    You might want to consider 302 Found as well. But I vote 303.

  • Matt | April 26th, 2007 @ 11:34 pm | Reply

    It uses 302 for me.

Share your thoughts