> -----Original Message-----
> From: Paul M Foster [mailto:pa...@quillandmouse.com]
> Sent: 23 July 2009 06:13
> On Thu, Jul 23, 2009 at 11:57:51AM +0800, ?????? wrote:
> > 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.

Or by the "pathinfo" mechanism, which I believe is also supported by other Web 
servers, and can work just as well, if it satisfies your requirements, without 
all the complications of mod_rewrite.


Mike Ford,
Electronic Information Developer,Libraries and Learning Innovation,  
Leeds Metropolitan University, C507, Civic Quarter Campus, 
Woodhouse Lane, LEEDS,  LS1 3HE,  United Kingdom 
Email: m.f...@leedsmet.ac.uk 
Tel: +44 113 812 4730

To view the terms under which this email is distributed, please go to 

PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to