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 EE16F10302 for ; Mon, 11 Nov 2013 00:03:31 +0000 (UTC) Received: (qmail 84627 invoked by uid 500); 11 Nov 2013 00:03:30 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 84541 invoked by uid 500); 11 Nov 2013 00:03:30 -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 84533 invoked by uid 99); 11 Nov 2013 00:03:30 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 11 Nov 2013 00:03:30 +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 (athena.apache.org: domain of alex.barbalex@gmail.com designates 209.85.219.52 as permitted sender) Received: from [209.85.219.52] (HELO mail-oa0-f52.google.com) (209.85.219.52) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 11 Nov 2013 00:03:26 +0000 Received: by mail-oa0-f52.google.com with SMTP id o6so372383oag.39 for ; Sun, 10 Nov 2013 16:03:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:date:message-id:subject:from:to:content-type; bh=y5Tr22Df++JAOsbMTFz6jUYicQ8QASn0kv0KUIAVpiQ=; b=RaEyBaBB3f56597EPVBJparPONA++dejUFkQ7Fkxk0WwR/2rPBRCGLBnLoRCTxmw0z SXi+rFg/3CvjUynKere5R+n2jsHu0swL6tD6MDKhFOMVgGEM4haieoa63BhRauvA1M9W y05kMSgLWTtFYlWs8BZdVAlAyqFBjbCDMAWHM4Xze1goEXCpPFHpO+LnnO8O62XGV40M VlLCGmvKDYSUFZmNT5fTZ2YNR3hBK0OlvhBTStqrMbcs99ihWzJzpIA42xC8zMSqKN8V H4ke/9n6QR3KdKRT32caZPkustAlpZfupsyQws6HvR0S+8ffYnpBQVs7nxfF/8Uq4Hea sJCA== MIME-Version: 1.0 X-Received: by 10.182.214.98 with SMTP id nz2mr15721508obc.37.1384128185142; Sun, 10 Nov 2013 16:03:05 -0800 (PST) Sender: alex.barbalex@gmail.com Received: by 10.182.132.10 with HTTP; Sun, 10 Nov 2013 16:03:05 -0800 (PST) Date: Mon, 11 Nov 2013 01:03:05 +0100 X-Google-Sender-Auth: wPJWzi_yY1VTIktaUv-STnjokAQ Message-ID: Subject: rewrites not working From: Alexander Gabriel To: user@couchdb.apache.org Content-Type: multipart/alternative; boundary=e89a8ff1cefecc94a704eadb74e5 X-Virus-Checked: Checked by ClamAV on apache.org --e89a8ff1cefecc94a704eadb74e5 Content-Type: text/plain; charset=UTF-8 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 " 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 --e89a8ff1cefecc94a704eadb74e5--