couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alexander Gabriel <>
Subject rewrites not working
Date Mon, 11 Nov 2013 00:03:05 GMT

I have a couchapp on
It's built with the original python couchapp tool.

My goal:
Instead of
the url should look like:

In local.ini I have:
[vhosts] = /artendb/_design/artendb/_rewrite
After uploading the local.ini file I do: "service couchdb restart" to apply

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.


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message