[cl-wiki-devel] Living without *wiki-url*

I've been working with Kevin Griffin on a couple of cl-wiki sites for a few weks now, and I've found that, more often than not, the *wiki-url* variable has been getting in my way. The problem arises out of the way I am integrating cl-wiki with apache -- I'm using proxy and rewrite rules to place a wiki in some directory in a web site (not necessarily /cl-wiki/), and I don't want to have to change that variable if I decide to move the wiki to a different directory (which involves modifying the source code, and re-exporting the lisp world). However, since the '/' character does not seem to be allowed in wiki names, the wiki is always a flat namespace, and so relative links will work in all situations. The only change needed to make this work is a redefinition of current-page to: (defun current-page () "Extracts the current page from the URL." (let ((url (tbnl:script-name))) (subseq url (+ 1 (position #\/ url :from-end T))))) and then the *wiki-url* prefix can be removed from all of the links in wiki.lisp as well as the templates. There's a working example up at http://research.cavewallarts.com/TOC2/ ; I'll have a diff available soon. Incidentally, the apache configuration I'm using in this case looks like this: <Proxy http://127.0.0.1:5757/> Order deny,allow Allow from all </Proxy> RewriteEngine On RewriteRule ^/TOC2$ /TOC2/ [R] RewriteRule ^/TOC2/$ /TOC2/Home [R] RewriteRule ^/TOC2/(.*) http://127.0.0.1:5757/cl-wiki/$1 [L,P] Regards, Ian Clelland <ian@gmail.com>

Thanks for the idea and patch, Ian! I had to add a change to WIKI:INIT, too. The prefix dispatcher isn't needed anymore. Now I just set TBNL:*DEFAULT-HANDLER* to 'WIKI
participants (2)
-
Ian Clelland
-
Stefan Scholl