On Sun, 30 Jan 2005, Lars Gullik Bjønnes wrote: > Added two aliases: > > Alias /pub/ /home/lyx/www/pmwiki/pub/ > Alias / /home/lyx/www/pmwiki/pmwiki.php/ > > And modified the $PubDirUrl in pmwiki.php from: > > $PubDirUrl = preg_replace("#/[^/]*\$#","/pub",$ScriptUrl,1); > > to > > $PubDirUrl = $ScriptUrl . "/pub"; > > Is it now working as you want it to?
Not quite, uploaded files are inaccessible (Uwe mailed me about that) and it's a bit inflexible for when deploying a test-version, which I'd like to do before changing to pmwiki-2. Anyway, I surfed a bit in the pmwiki list and I think we'd be better of using 'AliasMatch'. This should work: AliasMatch ^/([?A-Z].*) /home/lyx/www/pmwiki/pmwiki.php/$1 since it will only match things starting with A-Z (and group names must start with that in PmWiki anyway). The '?' is there in case pmwiki tries to do a reference such as http://wiki.lyx.org/?action=search before that kind of URI would have looked like this: http://wiki.lyx.org/pmwiki.php?action=search I don't think the '?' needs to be escaped since it's within [..] This should map URIs as follows: http://wiki.lyx.org/LyX/LyX -> http://wiki.lyx.org/pmwiki.php/LyX/LyX http://wiki.lyx.org/?action= -> http://wiki.lyx.org/pmwiki.php?action= and URIs such as these should be unaffected http://wiki.lyx.org/pmwiki.php/... http://wiki.lyx.org/pub/... http://wiki.lyx.org/uploads/... http://wiki.lyx.org/beta/... which also means that old links to inside the wiki should keep working. However, I suspect a second directive is needed for some special operations: * Handling the special case of http://wiki.lyx.org/ AliasMatch ^/$ /home/lyx/www/pmwiki/pmwiki.php In order to test that it works, I think the links below cover all (most?) scenarios: * Go to main page http://wiki.lyx.org * Show specific wiki page using a clean URI http://wiki.lyx.org/LyX/Documentation * Invoke pmwiki-script http://wiki.lyx.org/pmwiki.php?pagename=LyX%2FDocumentation http://wiki.lyx.org/?pagename=Main%2FSearchWiki?text=LyX * Access to pub/-files http://wiki.lyx.org/pub * Access to uploaded files http://wiki.lyx.org/uploads http://wiki.lyx.org/uploads/Examples/Bibunits/bibunits.sty /Christian -- Christian Ridderström, +46-8-768 39 44 http://www.md.kth.se/~chr