views:

27

answers:

1

We could access all pages of Mediawiki by url ./wiki/Special:Allpages.

But there is not php file that named Special:Allpages. How does mediawiki implement it?

Thanks.

+5  A: 

For an indepth explanation see: http://www.mediawiki.org/wiki/Category:Wiki_page_URLs

However, here is a condensed version:

In Mediawiki the URL is not a link to a specific page like a simple web site. Instead it is a key that is used by the code to determine what page is displayed and to whom it is displayed.

Everything points to a single PHP page and that page directs the request to the actual page being called. So a call to SomePage may actually go to MyPage.php instead of SomePage.php

Based on how one sets up Mediawiki (or other modern PHP sites) this can be accomplished in many ways.

For Apache users one can use ModRewrite: http://www.mediawiki.org/wiki/Manual:Short_URL/Apache_Rewrite_rules

Or one can use URL Local Settings: http://www.mediawiki.org/wiki/Manual:Short_URL/LocalSettings.php

Todd Moses