Return-Path: X-Original-To: apmail-couchdb-user-archive@www.apache.org Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id E56E81049E for ; Mon, 11 Nov 2013 01:52:24 +0000 (UTC) Received: (qmail 48919 invoked by uid 500); 11 Nov 2013 01:52:23 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 48870 invoked by uid 500); 11 Nov 2013 01:52:23 -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 48861 invoked by uid 99); 11 Nov 2013 01:52:23 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 11 Nov 2013 01:52:23 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS,WEIRD_PORT X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of alex.barbalex@gmail.com designates 209.85.214.172 as permitted sender) Received: from [209.85.214.172] (HELO mail-ob0-f172.google.com) (209.85.214.172) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 11 Nov 2013 01:52:17 +0000 Received: by mail-ob0-f172.google.com with SMTP id wm4so3738993obc.31 for ; Sun, 10 Nov 2013 17:51:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:content-type; bh=z7QWd7Sw/z+alY9su42rb/TTM4uX+mwDMMHl4LowHcU=; b=tVGRDZVIjWKzJmsCv/91pMVWtmwZ4JPLe1seJgJsF5iUzUEVDqaas3XQ1yBKaPjKRx TLnvIsSQ8f6tytcLNIzBXrDQKR1lCQf9aDV0wKwq8Q6JrKoitMSTnfHqjAiepEECh1Rj LCv/zpaVkZMl9zFN8GH1XtWHWX5GmrC6yzO8i353SviPaEaDiOOels0hXrIDEOnGX00H YecKyG3p2qf3dHES/9GxO6s0ieMp4Oq8jPOcoRXKSxBxSXy1+WeJWYYu4VkAYJq9trCK B0og4mobMPozmHT0E0PfmwlDsFg6E7muDr3AOcBAUcC5GROnejZOR2fNlZzi0A6SCsJu AnOA== MIME-Version: 1.0 X-Received: by 10.182.129.201 with SMTP id ny9mr22911030obb.0.1384134716199; Sun, 10 Nov 2013 17:51:56 -0800 (PST) Sender: alex.barbalex@gmail.com Received: by 10.182.132.10 with HTTP; Sun, 10 Nov 2013 17:51:56 -0800 (PST) In-Reply-To: References: Date: Mon, 11 Nov 2013 02:51:56 +0100 X-Google-Sender-Auth: CWnPT5Rs3mdy09nOJVAfBTRw55c Message-ID: Subject: Re: rewrites not working From: Alexander Gabriel To: user@couchdb.apache.org Content-Type: multipart/alternative; boundary=089e015366b4149e3904eadcfa02 X-Virus-Checked: Checked by ClamAV on apache.org --089e015366b4149e3904eadcfa02 Content-Type: text/plain; charset=UTF-8 lol o.k., side issue is solved: the rewrites.json file is copied as an object into the design doc. thanks a lot. Remains the fact that the url is not rewritten. Any Ideas for that? Alex 2013/11/11 Stanley Iriele > This gets me every time when I'm doing rewrites but a convenient way to > look it is...its a giant json object so....json extension > On Nov 10, 2013 4:22 PM, "Robert Newson" wrote: > > > rewrites.json not rewrites.js > > > > On 11 November 2013 00:03, Alexander Gabriel wrote: > > > Hi > > > > > > I have a couchapp on http://arteigenschaften.ch. > > > It's built with the original python couchapp tool. > > > > > > My goal: > > > Instead of > > > "http://arteigenschaften.ch/artendb/_design/artendb/index.html" > > > the url should look like: > > > "http://arteigenschaften.ch/index.html< > > http://arteigenschaften.ch/artendb/_design/artendb/index.html> > > > " > > > > > > In local.ini I have: > > > [vhosts] > > > arteigenschaften.ch:5984 = /artendb/_design/artendb/_rewrite > > > After uploading the local.ini file I do: "service couchdb restart" to > > apply > > > it. > > > > > > In my project root I have a file "rewrites.js" with this rule: > > > [ > > > { > > > "method": "*", > > > "from": "/artendb/_design/artendb", > > > "to": "" > > > } > > > ] > > > > > > This is copied into the design document by the couchapp tool. > > > > > > What am I missing to make it work? > > > > > > > > > > > > ***************** > > > Side issue: > > > > > > What seems rather odd to me is that the rewrites rules are copied not > as > > > clean json but as a string: > > > > > > "rewrites": "[\r\n\t{\r\n\t\t\"method\": \"*\",\r\n\t\t\"from\": > > > \"/artendb/_design/artendb\",\r\n\t\t\"to\": \"\"\r\n\t}\r\n]" > > > > > > > > > I once got an error in the frontend saying that rewrites should be json > > not > > > text but weird enough this message has not reappeared. > > > > > > Anyway, I have changed the rewrites rule in the design document in > futon > > to: > > > > > > "rewrites": [ > > > { > > > "method": "*", > > > "from": "/artendb/_design/artendb", > > > "to": "" > > > } > > > ], > > > > > > > > > This is nicer but - sigh - doesn't work either. > > > > > > > > > Thanks for help. > > > > > > Alex > > > --089e015366b4149e3904eadcfa02--