[
  {
    "from":"/new",
    "to":"_update/shorten"
  },
  {
    "from":"/:id",
    "to":"_show/long/:id"
  },
  {
    "from":"",
    "to":"_show/long/"
  }
]

Add rewrite rules. Now a standalone CouchDB instance can use vhosts and the rewriter to be a URL shortener.
Add rewrite rules. Now a standalone CouchDB instance can use vhosts
and the rewriter to be a URL shortener.

Set up with like this:

1. Create a new vhost, say short.io:

    curl -X PUT http://yourname.couchone.com/_config/vhosts/short.io -d '"/io/_design/io/_rewrite"'

  Alternatively, alter your local.ini and add:

    [vhosts]
    short.io = /io/_design/io/_rewrite

2. Done.
