You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@couchdb.apache.org by Wolfgang Egger <be...@wolfgang-egger.de> on 2010/09/25 15:13:23 UTC

_rewrite, vhots

Servus,

I do not get this url-rewriting running as expected.

What works is 
http://man.local/
as a vhost pointing to
http://loacalhost/man/_design/man/_rewrite

together with
"rewrites":[
{
      "from": "/manual",
      "to": "_view/manuals"
}
]

together with the correct line in /etc/hosts

http://man.local/manual

shows the expected view


But I have problems with the second rewrite:
{
  "from": "/shelf",
  "to": "/index.html"
}

http://man.local/shelf/
serves the index.html, but all "links" within (includes, css etc) could not be
found.

http://localhost/man/_design/man/ is a couchapp

What is the problem that the "internal links" could not be resolved and how to
solve that problem


Re: _rewrite, vhots

Posted by Benoit Chesneau <bc...@gmail.com>.
On Sat, Sep 25, 2010 at 4:25 PM, Wolfgang Egger <be...@wolfgang-egger.de> wrote:
> Wolfgang Egger <be...@...> writes:
>
>> I do not get this url-rewriting running as expected.
>
> "as expected" means as expected by me. I guess, that I did not got the point,
> how that rewriting really works.
>
> I meanwhile did some other playarounds with shows, where i use path.asset() and
> the resulting urls can't get resolved, too.
>
> Is it possible to develop a chouchapp using this vhosts/_rewrites - mechanism?
>
> Have a nice and relaxed weekend!
>
> Wolfgang
>
>
>


To do this add these line in your local.ini :

[vhosts]
*/shelf =/man/_design/man/index.html

- benoƮt

Re: _rewrite, vhots

Posted by Wolfgang Egger <be...@wolfgang-egger.de>.
Wolfgang Egger <be...@...> writes:

> I do not get this url-rewriting running as expected.

"as expected" means as expected by me. I guess, that I did not got the point,
how that rewriting really works.

I meanwhile did some other playarounds with shows, where i use path.asset() and
the resulting urls can't get resolved, too.

Is it possible to develop a chouchapp using this vhosts/_rewrites - mechanism?

Have a nice and relaxed weekend!

Wolfgang