couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Davis <>
Subject Re: Rewriting URLs
Date Sat, 04 Jul 2009 22:12:13 GMT
On Sat, Jul 4, 2009 at 6:08 PM, Noah Slater<> wrote:
> Hey Jason,
> On Sat, Jul 04, 2009 at 10:34:27PM +0100, Jason Davies wrote:
>> The basic idea is you add a "rewrites": [...] member to your design doc.
>> This will allow rewriting of any URLs with the prefix mydb/
>> _design/app/_rewrite.  The "rewrites" member is a list of rewrite rules
>> of the form {match: ["foo/bar/<var>"], rewrite:["_view/myview",
>> {startkey: ["<var>"], endkey: ["<var>", {}]}]
> This is great!
> Don't let me contribute stop-energy, but I am thinking that if we're going to do
> this, we might want to go the full way an implement this from the root URI of
> the whole CouchDB server instead.
> Best,
> --
> Noah Slater,

We've discussed where to push the URL rewriting previously. The
biggest argument against a DB wide rewrite scheme is that _design/
documents could end up stomping on each other pretty easily.

For reference in case other people are confused, the rewrite
capabilities would be best used by putting a proxy in front of CouchDB
that would rewrite all urls to the appropiate CouchDB path.

Something like:

Rewrite to

Paul Davis

View raw message