Hi Jon, > href="doc/ref.html">ref.html</a>, but in the browser that was > expanded to the double-doc > "http://demo-project.jkleiser.c9.io/doc/doc/ref.html". On c9.io I > ... > sure. Can you suggest a fix for my "default" script that will make > it work in both contexts?
Hm, this sounds as if the browser is using a different "<base href=" tag. The PicoLisp server generates one, but it contains only the protocol (http or https), hostname and port. No path names whatsoever. So I have no idea at the moment. > One more question: > Since in my web.l I use ... > (allowed ("doc/") "lib.css" "@lib/form.js" "favicon.ico" "!foo" "README") > .. I get a "404 Not Found" if I try to go to > "http://demo-project.jkleiser.c9.io/doc" (with no "/" at the end). > Can I modify my "allowed" to allow "doc" without the "/" at the end? Yes, just omit the "/". Everything in the list argument to 'allowed' is allowed if it starts with those characters (i.e. is matched with 'pre?'). You just must be sure that there is no file or directory starting with "doc" which should not be allowed. Another way (perhaps better) would be to include "doc" in the normal (exact) arguments to 'allowed' (and also keep "doc/" in the list). This allows direct requests to both "doc/" and "doc", but not "docxxx". ♪♫ Alex -- UNSUBSCRIBE: mailto:firstname.lastname@example.org?subject=Unsubscribe