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 A81DA10990 for ; Tue, 8 Oct 2013 13:24:14 +0000 (UTC) Received: (qmail 80912 invoked by uid 500); 8 Oct 2013 13:24:11 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 80869 invoked by uid 500); 8 Oct 2013 13:24:11 -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 80856 invoked by uid 99); 8 Oct 2013 13:24:11 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 08 Oct 2013 13:24:11 +0000 X-ASF-Spam-Status: No, hits=2.2 required=5.0 tests=HTML_MESSAGE,NORMAL_HTTP_TO_IP,SPF_PASS,WEIRD_PORT X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [5.39.77.163] (HELO oscar.yrnm.net) (5.39.77.163) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 08 Oct 2013 13:24:06 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=yrnm.net; s=oscar; h=Content-Type:In-Reply-To:References:Subject:To:MIME-Version:From:Date:Message-ID; bh=g2NKdvMgtNb584Nhu3IKXS0tB8J2h4Ap+jNKxWw2OAw=; b=ZBXCwNxZa9xc6Z/+iekl780zdrf0ZZXgluUWM5POV/qMVZYE0b0OUrZ5MkAncd/ZuOSW5ieI9+OU8UaZdE3GRofZ//j0TbWr1jwDtpfKsJYBlFkq1VK9jcQX6fkyWxOSxrZe0fnHI627ixzKB4MVxHPGD/YJC5ONahfUuB04WgE=; Received: from [151.52.198.51] (helo=sheeva.dianck) by oscar.yrnm.net with esmtp (Exim 4.76) (envelope-from ) id 1VTXGJ-0002Im-VC for user@couchdb.apache.org; Tue, 08 Oct 2013 15:23:44 +0200 Received: from [192.168.0.4] (helo=xanthus) by sheeva.dianck with esmtp (Exim 4.72) (envelope-from ) id 1VTXGD-0004c0-IE for user@couchdb.apache.org; Tue, 08 Oct 2013 15:23:37 +0200 Received: from localhost ([127.0.0.1]) by xanthus with esmtp (Exim 4.76) (envelope-from ) id 1VTXGC-0006dy-Ps for user@couchdb.apache.org; Tue, 08 Oct 2013 15:23:36 +0200 Message-ID: <52540758.3040602@nospam.yrnm.net> Date: Tue, 08 Oct 2013 15:23:36 +0200 From: Franck Eyraud User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.0 MIME-Version: 1.0 To: user@couchdb.apache.org Subject: Re: Having troubles with rewrites References: In-Reply-To: Content-Type: multipart/alternative; boundary="------------020106060902020403010601" X-Virus-Checked: Checked by ClamAV on apache.org --------------020106060902020403010601 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Hi Mark, > Ok so now I've added a rewrites.js file to my Couchapp root folder. In this > js file I have... > > [ > { > "method": "GET", > "from": "/home", > "to": "app/index.html", > } > ] In my couchapp rewrites.js file, I don't have any heading / in the from entry, but it could be that it works anyway. For this rewrite to work, you need an attachment to the design doc called app/index.html (or a file _attachments/app/index.html in your couchapp project). Is this the case ? Did you check you vhost entry ? database/_design/designdocname/_rewrite One very good hint to know what is going on is looking at the couch.log file, since the rewritten path is showed there, so you can understand what the rewrite engine is doing. > Also, I keep "services" open the background restart Couch after nearly > every change. When you change one of the ini's, you have to. Do you know that you can edit the config on the fly ? Either with futon http://127.0.0.1:5984/_utils/config.html by editing the vhosts/hostname key or with curl doing |curl -XPUT -d'"||rednecks/_design/rednecks/_rewrite"' http://admin:password@127.0.0.1:5984/_config/vhosts/rnr.couchdb:5984| Both these methods don't require a couchdb restart (reload is done automatically). Very handy ! Franck --------------020106060902020403010601--