[Mediawiki-l] Re: MediaWiki-l Digest, Vol 16, Issue 10

N. M. Buzdor mediawiki at buzdor.com
Wed Jan 12 16:28:33 UTC 2005


>> ---LocalSettings.php snippet---
>> $wgScriptPath     = "";
>> $wgScript           = "$wgScriptPath/index.php";
>> $wgRedirectScript   = "$wgScriptPath/redirect.php";
>> ---End snippet---
>[snip]
>> RewriteRule ^(.*)$ cmw/$1 [L]
>> ---End snippet---
>
> Won't this cause all the /index.php.* to be rewritten to
> /cmw/index.php.* internally?

Brion Vibber and other MediaWiki gurus--

I don't think it works quite that way, but it's possible.  The subdomain
cmw.buzdor.org has a root which is mapped (by this .htaccess) to the
physical server path cmw/ relative to the root of the service package.  It's
my understanding that this rule maps the url
http://cmw.buzdor.org/index.php?title=Main_page to the *filesystem* path
/cmw/index.php and passes the same query string.  I thought the abstraction
from the URL layer to the filesystem layer was transparent to the PHP
software, since no one (and I mean no one) runs their website from their
TRUE root / on their *nix server.  I did not know that this would be an
issue for the wiki software, since it can (and should) make all URLs (and
client redirect headers) relative to the root of cmw.buzdor.org, and it
should never issue a URL containing the path /cmw/.  It was my supposition
(having installed SquirrelMail, PhpBB, and other PHP programs the same way)
that the software would take me at my word when I said it was at the root
for URL purposes.  Perhaps there's an obscure, oversensitive server variable
that no other program uses to determine request URL that MediaWiki is
dependent upon, and I could switch that to the traditional one in my copy of
the code.

> This could produce a mismatch between the defined $wgScript and the
> path the wiki sees itself at internally when checking that raw pages
> are being loaded from the canonical URL.

Would you recommend I write a temporary index.php dumping server variables
to the user, so we can diagnose whether some variable the server is passing
to the Wiki is confusing it?  What server or request variable is suspect?

This is a fascinating problem through which I'll probably learn quite a bit
about Apache, and even more about MediaWiki.  Thanks for your time!

--N. Buzdor




More information about the MediaWiki-l mailing list