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: authentication_redirect is not working.
Date Mon, 14 Apr 2014 16:13:43 GMT
On Mon, Apr 14, 2014 at 5:55 PM, Scott Weber <scotty2541@sbcglobal.net>wrote:

> No, that doesn't work.  It actually is worse.
>
> If I remap the vhosts to a DB/Document, it gives me the WHOLE DOCUMENT:
> [vhosts]
> www.mycompany.com = /login/source/
>
> Results:
> www.mycompany.com  -> maps to -> www.mycompany.com/login/source/
> (where 'login' is the landing zone, and 'source' is the document that has
> the HTML attachment)
>
>
> On the other hand, when I map it to the document like this:
> [vhosts]
> www.mycompany.com = /login/source/index.html
>
> Results:
> www.mycompany.com   -> maps to ->
> www.mycompany.com/login/source/index.html
> however, now it is trying to open style sheets and js files that have the
> name:
>
> www.mycompany.com/login/source/index.html.mystyle.css
> www.mycompany.com/login/source/index.html.mainpage.js
>
> The obvious work around is to use the former option and mustspecify "
> www.mycompany.com/index.html" as required on the address bar.
>


Actually I also mentioneed something about the rewrite.

so

www.mycompany.com = /db/ddoc/_rewrite

and do the reqrite in it

[{ "from": "/",
   "to": /index.html
 },...]

and put an index.html in your ddoc attachments.


>
> Which is not what is expected or were hoping for.  All other web servers
> allow a default doc setting, typically index.html or index.htm.  Does
> CouchDB not have something equivalent?
>

You may be able to do:

/ = {couch_httpd_misc_handlers, handle_utils_dir_req, "/path/to/index.html"}


but it will probably break some clients and the replication.

Another way is to do that on the proxy level.

- benoit

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