Re: Mediawiki's url confusion

From: Date: Thu, 23 Jul 2009 05:12:54 +0000
Subject: Re: Mediawiki's url confusion
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-295730@lists.php.net to get a copy of this message
On Thu, Jul 23, 2009 at 11:57:51AM +0800, ?????? wrote: > Hi everyone: > > I've been studying the codes of Mediawiki for some time. > > I'm convinced that the file "index.php" is the only entrance to the whole > site. > > But I cannot help myself with the url pattern : > /somepath_to_mediawiki/index.php/pagetitle. > > How can this kind of url be parsed to the file "index.php" and the > "pagetitle" be parsed as params? > > Why the web server not go straight into path "index.php/" and look for the > file named "pagetitle" ? > This type of thing is common for sites using the "MVC" or "Model-View-Controller" paradigm. The index.php file is what's called a "front controller". A front controller is usually the entrance to all the other pages of a site. URLs like this often take advantage of an Apache feature called "mod_rewrite", which tells Apache how to handle URLs which look like this. You can look on wikipedia.org for these terms or google for them, and find full explanations. Paul -- Paul M. Foster

« previous php.general (#295730) next »