MicroWiki mod_rewrite Code!!
After much blood, sweat, and headaches I have gotten MicroWiki to use search engine friendly URLs. The MicroWiki site describes a way to do it with ISAPI, and I quickly found out that the method does not work with Apache mod_rewrite. Well, I wasn’t about to have query strings in my MicroWiki implementation, so I set out on a mission to get the job done myself. It shouldn’t have been as much of a headache as it was, but I am making great progress. I have saved the MicroWiki-specific code in my .htaccess to a text file.
I really hope that someone else will be able to use this, let me know if you do! There is one limitation, and it won’t make any difference unless your visiters manually mess around with the URL. It doesn’t work correctly with a trailing slash (yet). So, as of now, the URL “/_wiki/index” produces different results than “/_wiki/index/”. Don’t worry, I won’t stand for this. I’ll be trying to fix it as soon as possible. If any of you mod_rewrite experts out there know of a way to fix it, or of a better way to do the whole thing, don’t hesitate to leave some feedback! During the process of getting this to work, I kind of broke the site for a few hours :); everything should be in working order now, and hopefully I’ll be providing a link to the shiney new Soulpass Wiki very soon!
February 15th, 2005 at 6:51 pm
Neat-o.
Say, if you get these working with the slashes (and maybe I can help with that if I get some time), can I add it to the MicroWiki documentation?
May 6th, 2005 at 10:04 pm
Thank you!
I got your original mod_rewrite rules from the microwiki web site. It worked for all the microwiki links except “new page”. I was beating my head into the wall trying to get it to work. Google pointed me to this page and your new version of the rules work correctly.
May 11th, 2005 at 4:19 pm
Eek!!! The code that works is actually the old code! I’d hate to bother Owen again with this mod_rewrite stuff… That sucks that the new code does not work. I’ll have to take a look at what’s going on there. *sigh*
May 11th, 2005 at 4:53 pm
Alright… I’ve updated the new code and it should work now. Apparently it’s not as efficient as it could be, but I think that this is the way it has to be.
May 11th, 2005 at 6:42 pm
Really he shouldn’t be publishing your code on his page at all, for exactly this reason. He should just link to where YOU publish it, so anty updates you make will automatically appear.