[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [MirageOS-devel] Problem with `mirage run`on unix build of static_website
On 26 Feb 2014, at 06:43, Richard Mortier <Richard.Mortier@xxxxxxxxxxxxxxxx> wrote: > > On 26 Feb 2014 00:34, Amir Chaudhry <amc79@xxxxxxxxx> wrote: > > > > One thing I've noticed is that all my internal links are broken. I have > > URLs of the form "domain.com/title-of-post", where the content is actually > > at "domain.com/title-of-post/index.html". How do I go about fixing this, > > assuming I can? Or does it require new code somewhere to support URLs like > > this (e.g. cohttp)? > > > > This is handled by the URL dispatcher. Can't remember filename, but > unikernel.ml or site.ml or something. There will be a match statement that > maps the requested URL to an actual file, in a try clause that handles the > case where the file doesn't exist iirc. You'll probably want to tweak that so > that it also maps urls ending too/index.html to the file foo as well. > > If using cowabloga, this chunk of code could be in there instead, can't > remember off top of my head. But look in the site code first… Helpful info, thanks! There's a file called dispatch.ml and it looks like the piece I need is in there [1]. However, I'm not sure how to edit it to get what I want. I'm guessing it involves adding some more code to try different locations for the content before raising the exception (see lines 39 40 at link below). [1] https://github.com/mirage/mirage-skeleton/blob/master/static_website/dispatch.ml#L32 ac _______________________________________________ MirageOS-devel mailing list MirageOS-devel@xxxxxxxxxxxxxxxxxxxx http://lists.xenproject.org/cgi-bin/mailman/listinfo/mirageos-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |