Tweaks for getting MoinMoin to work on Hurricane Electric

First off, it's natural to make a directory within your public_html dir called: wiki, and then want to serve your wiki from there. The default behavior of moinmoin appears to reference the moin.cgi script within URL calls to the wiki. So if you have wiki page about MyFoo, the url would look something like:

http://www.yoursite.com/wiki/moin.cgi/MyFoo

Whereas, the URL most people would like to use is:

http://www.yoursite.com/wiki/MyFoo

I tried for several days to figure out how to use mod_rewrite to rewrite the URLs so that users would not see the reference to moin.cgi. Since I can do CGI in the wiki directory, I had left the moin.cgi script in the wiki directory, instead of placing it in cgi-bin. Although I could re-write URLs, for some reason the moin.cgi script always crashed if it was in the wiki directory from which the URLs were being re-written. However, moving it somewhere else solved the problem. In the end, the only solution I could find was to put moin.cgi somewhere other than the wiki directory, and re-write URLs to reference it in that other location. The following .htaccess directives to mod_rewrite seem to work:

Configuring mod_rewrite for nice URLs

RewriteEngine on
# skip directories with stuff in them
RewriteRule ^/?classic/ - [last]
RewriteRule ^/?common/ - [last]
RewriteRule ^/?modern/ - [last]
RewriteRule ^/?applets/ - [last]
RewriteRule ^/?rightsidebar - [last]
# match WikiWords and arguments and hand them to moin.cgi
RewriteRule ^/?(.*)$ ../YourPathTo/moin.cgi/$1 [type=application/x-httpd-cgi] 

Display

xxx

MoinMoinInstall (last edited 2009-03-28 23:12:12 by ChrisSeidel)