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?
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?