Is there any one know, what is the url rewrite rule in wikipedia article’s url?
I find some thing:
and, of ,in… all the conjunction write in lowercase.
The place name, people name, history event name, all the first letter would be capitalize.
http://en.wikipedia.org/wiki/New_York_City
http://en.wikipedia.org/wiki/Abraham_Lincoln
http://en.wikipedia.org/wiki/American_Civil_War
but sometimes only the first letter would be capitalize.
http://en.wikipedia.org/wiki/Digestive_system
So what a complex rewrite system wikipedia had, and how many codes make it run?
I have download one mediawiki system, from http://www.mediawiki.org/wiki/Download. But for my ability, I can not find anything in .htaccess or php code.
The capitalization is part of the article title; only the first letter is always capitalized by the URL rewriting. E.g., there’s a Wikipedia page on “true love” and one on “True Love” (though the former redirects to the latter).
The main other thing that the URL rewriting seems to do is strip whitespace off the end of the page title and replace any contiguous number of whitespace characters in the remaining string by a single
_.See also the Mediawiki’s Manual:Short URL.