incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Benoit Chesneau <bchesn...@gmail.com>
Subject Re: Passing parameters in simple URLs
Date Sat, 09 Feb 2013 07:44:18 GMT
On Feb 9, 2013 6:21 AM, "Wordit" <wordituk@gmail.com> wrote:
>
> I'd like to pass a few parameters via an app's url without using the
> server-side style "?param1=a&param2=b".
> Instead, I'd like to use segments like this
> "../database/index.html/a/b". I tried adding a hashtag
> ".../index.html/#/a/b", but couchdb didn't like that at all.
>
> I can process the url with javascript. Where I'm stuck is preventing
> couchdb from processing the url after the index.html section.
>
> What alternatives are there to pass params in simple urls? Are there
> any rewrite rules which may help?
>
> Thanks,
>
> Marcus
Not sure if it's what you want but you can use a rewrite rule:

{"from": "/:a/:b/", "to": "index.html"}

a and b will be passed as query parameters to the index  while the user
will query /a/b.

- benoƮt

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