Return-Path: Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: (qmail 63384 invoked from network); 22 Nov 2010 02:06:20 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 22 Nov 2010 02:06:20 -0000 Received: (qmail 22789 invoked by uid 500); 22 Nov 2010 02:06:47 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 22746 invoked by uid 500); 22 Nov 2010 02:06:47 -0000 Mailing-List: contact user-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@couchdb.apache.org Delivered-To: mailing list user@couchdb.apache.org Received: (qmail 22738 invoked by uid 99); 22 Nov 2010 02:06:47 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 22 Nov 2010 02:06:47 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of tjw@omnigroup.com designates 198.151.161.1 as permitted sender) Received: from [198.151.161.1] (HELO machop.omnigroup.com) (198.151.161.1) by apache.org (qpsmtpd/0.29) with SMTP; Mon, 22 Nov 2010 02:06:38 +0000 Received: from [192.168.0.18] (c-98-232-93-22.hsd1.wa.comcast.net [98.232.93.22]) by machop.omnigroup.com (Postfix) with ESMTP id 83B1B1CD770F0 for ; Sun, 21 Nov 2010 18:06:16 -0800 (PST) From: Timothy Wood Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable Subject: PUT/POST to app using rewrites+vhost? Date: Sun, 21 Nov 2010 18:06:16 -0800 Message-Id: To: user@couchdb.apache.org Mime-Version: 1.0 (Apple Message framework v1082) X-Mailer: Apple Mail (2.1082) X-Virus-Checked: Checked by ClamAV on apache.org I have rewrites and vhost support working now (thanks for the help!). = The next issue I=92m flailing on is how to best perform edits to my = database, while still using the nice URL structure. With a vhost going to /db/_design/app/_rewrite, all the incoming URLs = get written to have /db/_design/app as a prefix. So, to PUT/POST = new/updated documents, I added rewrites of: { "from": "/*", "to": "../../*", "method": "PUT" }, { "from": "/*", "to": "../../*", "method": "POST" }, I also played a bit with rewriting to a _update/put function. I never = got this approach working fully before thinking I should just redirect = up with ../.. in the rewrite. It seems harder to use _update than just = escape the _design/app namespace this way. My question then, is -- is this standard procedure, or should I avoid = this approach for some reason? Thanks! -tim