Return-Path: Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: (qmail 34730 invoked from network); 4 Mar 2011 08:41:06 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 4 Mar 2011 08:41:06 -0000 Received: (qmail 32623 invoked by uid 500); 4 Mar 2011 08:41:05 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 32594 invoked by uid 500); 4 Mar 2011 08:41:05 -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 32586 invoked by uid 99); 4 Mar 2011 08:41:05 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 04 Mar 2011 08:41:05 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of helions8@gmail.com designates 209.85.161.180 as permitted sender) Received: from [209.85.161.180] (HELO mail-gx0-f180.google.com) (209.85.161.180) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 04 Mar 2011 08:40:58 +0000 Received: by gxk19 with SMTP id 19so912231gxk.11 for ; Fri, 04 Mar 2011 00:40:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type:content-transfer-encoding; bh=pwElAtQFI/olKNtUSPO6UAK3B3wzkNWgLKjN5vkFIe4=; b=vQqdu3XBJKLfwO76hpuJP9fO7tZkIsKWs+lXCKqzWueqdb2N40d5L6mFg4lDM4+rB+ KnCn8hDsJtCN8Y5g/v5nQTfRvXd/G86D0eb1UOgw3s5xaYSrxPtAGzpJkL80I3cyPYCe v1sqTTBFTIncTiBNWI80jLdCLxq7IdiQvBsEI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=rtPy33+/vF/0PJ2810BNIQrpcs9mbX/ue2vSDNuQMipF2z3WYVr1d+aqCCtUDj2R1h XurI2wTN8lruVCjBMf8cJ2xfu7E6DwaqxXXcDnljRZGEHT05AJHtiEfkX6gd3RR8b2qj s/SMKMcszTg+lmHbKpPqAadp1eBUkagPD7qgs= MIME-Version: 1.0 Received: by 10.151.145.18 with SMTP id x18mr378157ybn.133.1299228037958; Fri, 04 Mar 2011 00:40:37 -0800 (PST) Received: by 10.150.139.10 with HTTP; Fri, 4 Mar 2011 00:40:37 -0800 (PST) In-Reply-To: References: Date: Fri, 4 Mar 2011 10:40:37 +0200 Message-ID: Subject: Re: Rewrite urls and views issue From: Dmitry Stropaloff To: user@couchdb.apache.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 2011/3/4 Benoit Chesneau : > On Fri, Mar 4, 2011 at 9:06 AM, Dmitry Stropaloff wr= ote: >> Hi, >> >> I'm trying to rewrite urls for my views (application will use CouchDB >> virtual host): >> >> "from": "/views/*", >> "to": "_view/*", >> "method": "*", >> "query": {} >> >> So, when I try to access db/_design/db/_rewrite/views/ >> in log there is such info: rewrite to "/db/_design/db/_view" >> >> As expected, I get=C2=A0{"error":"method_not_allowed","reason":"Only >> GET,POST,HEAD allowed"} >> >> But if I try to reach some view function - db/_design/db/_rewrite/views/= all >> in log I get a very strange (for me) message: rewrite to >> "/db/views/all?doc=3Dviews&attachment=3Dall" > > Never saw that. what exact url are you calling and the rewrite rules ? > > - beno=C3=AEt > I'm calling http://localhost:5984/db/_design/db/_rewrite/views/all - url rewrite rules and view urls are from my app. "all" view is a simple map function. Application was created with CouchApp, and view stored in the views/all/map.js file. After pushing it to CouchDB this view can be accessed via db/_design/db/_view/all url. Thanks, Dmitry