PDA

View Full Version : Wikipedia URIs?



mstenta
27 Jun 2007, 12:38 PM
I've been wondering for a while how Wikipedia accomplishes its URIs.

For example, anything that is typed in after http://www.wikipedia.com/wiki/... is parsed. If the article exists, it is displayed under the URI http://www.wikipedia.com/wiki/article_name. If it doesn't exist, then it still shows the URI as if it does exist, and displays a page that gives you the ability to create it. It can't be an actual file directory structure (given the fact that you can type in nonsense and it will still preserve in in the URI), so it must be something with the way in which the URIs are handled by the server?

Does anyone know how this is accomplished?

bjk2007
07 Jul 2007, 07:28 PM
I'm not sure on this either, but I do know that the code igniter PHP framework uses this same behavior. You don't have to make any server adjustments for this to take effect and there aren't any .htaccess files controlling this, so it must be part of the PHP. You might be able to inquire about this at www.codeigniter.com and be able to find out from there.