couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ido Ran <>
Subject VHosts and Rewrite rules
Date Mon, 18 Oct 2010 16:48:20 GMT
I've found these two articles about rewrite urls and virtual host in

But yet I didn't manage to make it work on my localhost CouchDB instance.

I have a database called "todos" with one design-document called "app" and a
view in the ddoc called allTasks.
Currently to get all the tasks in the database the url is
I would like to have the url http://localhost:5984/todos/tasks rewritten to
the previous url.

I add rewrites value to my ddoc and add the following rule:
       "from": "/tasks",
       "to": "_view/allTasks",
       "method": "GET"

Now when I ask for http://localhost:5984/todos/_design/app/_rewrite/tasks it
rewrite the url to _design/app/_view/allTasks so that one works.

I've add vhosts section to my local.ini file and there I'm not sure how to
redirect http://localhost:5984/todos/* to

If someone can please help it will be great.

Thank you,

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message