It's been stated here before that one should not put the wiki directly under the root of your site, like "http://www.mysite.com/ WikiWord", but rather have something else in-between, like "http:// www.mysite.com/wiki/WikiWord".
I forget the reason for this, and wonder if that reason holds true for a hack I just implemented. I have Apache set up to go to Error.php upon encountering a missing page, which contains the following:
<html><head> <meta http-equiv="refresh" content="0; url=/wiki/<?php echo basename ($_SERVER['REDIRECT_URL']) ?>"> </head><body></body></html>
This effectively means that a URL "http://www.mysite.com/WikiWord" will be redirected to "http://www.mysite.com/wiki/WikiWord".
Is this a bad thing? Should I just throw up a generic error page instead?
:::: I have no doubt that it is possible to give a new direction to technological development, a direction that shall lead it back to the real needs of man, and that also means: to the actual size of man. Man is small, and, therefore, small is beautiful. -- EF Schumaker :::: :::: Jan Steinman, SEEDS http://www.IslandSeeds.org/wiki ::::
On 12/12/05, Jan Steinman Jan@bytesmiths.com wrote:
This effectively means that a URL "http://www.mysite.com/WikiWord" will be redirected to "http://www.mysite.com/wiki/WikiWord".
Type http://en.wikipedia.org/WikiWord and see what happens :) [If it's good enough for Wikipedia...]
As for why not just have your wiki contents there in the first place, it's because it rules out exposing anything other than articles, including things that have to be in the root like "robots.txt" and [for maximum compatibility] "favicon.ico", and of course the scripts themselves.
-- Rowan Collins BSc [IMSoP]
mediawiki-l@lists.wikimedia.org