From: Daniel K. <da...@da...> - 2015-08-02 15:33:40
|
Thank you Emmanuel. I'm not very familiar with Apache mod_rewrite, but I don't think that's what I'm looking for. To be more specific, the way I've got it working so far, if I point the browser to: /kiwix/ I expect to see the library, and I do. However if I click on Wiktionary, it takes me to: /wiktionary_en_all_2015-07/ rather than: /kiwix/wiktionary_en_all_2015-07/ This is already a problem. I could create a rewrite rule to make Wiktionary display at /wiktionary_en_all_2015-07/, but that defeats the purpose of what I'm trying to do. I want to keep all of Kiwix under /kiwix/, and other things under other sub-paths. Does this make sense? I believe that I need to actually edit Kiwix to make it render the URLs differently. If anything, I would want mod_substitute, though that's a rather blunt approach which I probably don't want to take. I'd rather modify Kiwix. So, my question is, how hard would the necessary changes in Kiwix be? Thanks a lot, Dan On Sun, Aug 2, 2015 at 12:51 AM, Emmanuel Engelhart <ke...@ki...> wrote: > Hoi Daniel > > On 02.08.2015 06:42, Daniel Krol wrote: > > I was playing around with configuring Kiwix for Apache via a > > reverse-proxy, and setting it at a base path other than root. For > > instance, I would have every URL prefixed with /kiwix/. This is simple > > enough to pull off such that the pages load at the URLs I expect them. > > However, the hrefs within Kiwix assume that all URLs start at /. So, for > > instance I can get the library to show up, but the link to Wiktionary > > doesn't work, and none of the CSS or JS resources load. > > > > I was thinking of trying to go in there and make it possible to set an > > alternate URL root with a kiwix-serve command line option. I've never > > worked with developing Kiwix before. I figure I have to mess with the > > URL router, as well as all of the html templates. I was wondering if I > > should expect this to be particularly difficult or arduous? I was also > > wondering about the likelihood that such a patch would be accepted in > > the project? > > It is not really hard to get it working like you want, but you need > indeed to configure the reverse-proxy correctly. > > Here is the configuration with use on our kiwix-plug: > https://sourceforge.net/p/kiwix/other/ci/master/tree/plug/conf/nginx.conf > > It's not exactly what you need, but this show you which kind of URL to > rewrite to get the CSS/JS working. > > Hope this helps. > > Regards > Emmanuel > -- > Kiwix - Wikipedia Offline & more > * Web: http://www.kiwix.org > * Twitter: https://twitter.com/KiwixOffline > * more: http://www.kiwix.org/wiki/Communication > > |