RE: [PHP] Mediawiki's url confusion
| From: | Ford, Mike | Date: | Thu, 23 Jul 2009 10:06:29 +0000 |
| Subject: | RE: [PHP] Mediawiki's url confusion | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-295737@lists.php.net to get a copy of this message | ||
> -----Original Message-----
> From: Paul M Foster [mailto:paulf@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.
Cheers!
Mike
--
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.ford@leedsmet.ac.uk
Tel: +44 113 812 4730
To view the terms under which this email is distributed, please go to http://disclaimer.leedsmet.ac.uk/email.htm