http://www.mediawiki.org/index.php/article_name
My Mediawiki is set-up so that index.php is displayed in the URL, followed by the article name.
I can see no .htaccess files, so how does index.php process the subsequent article name, rather than Apache looking for a directory whose name is /article_name... and then why is there no 404 error?
Where's the clever bit of code that handles this?
Regards, Ian Tresman
http://www.mediawiki.org/index.php/article_name
My Mediawiki is set-up so that index.php is displayed in the URL, followed by the article name.
I can see no .htaccess files, so how does index.php process the subsequent article name, rather than Apache looking for a directory whose name is /article_name... and then why is there no 404 error?
Where's the clever bit of code that handles this?
Does it need a clever bit of code? index.php isn't a directory, so there is no reason to think article_name is a subdirectory of it.
Ian Tresman wrote:
http://www.mediawiki.org/index.php/article_name
My Mediawiki is set-up so that index.php is displayed in the URL, followed by the article name.
I can see no .htaccess files, so how does index.php process the subsequent article name, rather than Apache looking for a directory whose name is /article_name... and then why is there no 404 error?
Where's the clever bit of code that handles this?
Most webservers will recognise when you try to use a script like a directory. They call the script with the PATH_INFO environment variable set to the remainder of the path. This behaviour is part of the CGI standard.
-- Tim Starling
At 23:05 22/03/2007, you wrote:
Ian Tresman wrote:
http://www.mediawiki.org/index.php/article_name
My Mediawiki is set-up so that index.php is displayed in the URL, followed by the article name.
I can see no .htaccess files, so how does index.php process the subsequent article name, rather than Apache looking for a directory whose name is /article_name... and then why is there no 404 error?
Where's the clever bit of code that handles this?
Most webservers will recognise when you try to use a script like a directory. They call the script with the PATH_INFO environment variable set to the remainder of the path. This behaviour is part of the CGI standard.
Thanks for everyone's help. Easy when you know how.
Regards, Ian
wikitech-l@lists.wikimedia.org