Help:URL

Great site. Keep doing.,

URLs of pages within the projects
See w:Wikipedia:URLs. On other projects everything works the same, except that the domain names vary:


 * xx.wikipedia.org with xx the language code, see Complete list of language Wikipedias available
 * meta.wikimedia.org (meta.wikipedia.org redirects there)
 * xx.wiktionary.org
 * xx.wikiquote.org
 * xx.wikibooks.org
 * xx.wikisource.org
 * sep11.wikipedia.org

A URL starting with www.wikipedia.org redirects to the corresponding one starting with en; only www.wikipedia.org itself leads to a portal page instead of the main page of the English Wikipedia: http://www.wikipedia.org

In projects outside Wikimedia the "w/" in URLs like http://www.wikipedia.org/w/wiki.phtml?title=Main_Page&action=history is sometimes not used, sometimes different, e.g.:
 * http://www.disinfopedia.org/wiki.phtml?title=Disinfopedia_Main_Page&action=history
 * http://wikitravel.org/en/index.php?title=Main_Page&action=history

The default is /wiki/wiki.phtml, with in DefaultSetting.php :

$wgScriptPath = "/wiki"; $wgScript    = "{$wgScriptPath}/wiki.phtml";

There may be other variations, compare:
 * http://en.wikipedia.org/wiki/Vancouver
 * http://wikitravel.org/en/Vancouver

Use in templates
For use in templates, note that all URLs on e.g. the English Wikipedia can be written in the form

http:// en.wikipedia.org/w/index.php?title=

This requires to be written with underscores and escape codes (if applicable), or can be escaped with. To benefit from the conversion carried out by fullurl, two parameters are needed:

(see Template talk:Url 2p). An example with the second parameter in fullurl fixed is ed containing the link [ ].

This works for a link in external link style to a page in the same project. We can use localurl for a link to a project which uses the same string in the URL between the server name and the question mark ($wgScript, on Wikimedia "/w/index.php"), but not for links to other projects.

Old versions of pages
All old versions of all pages are numbered (with oldid) approximately in the order of becoming an old version, i.e. in chronological order of the next edit of the same page.


 * http://meta.wikimedia.org/w/wiki.phtml?title=Help:Link&oldid=53587 - normal link to old page
 * http://meta.wikimedia.org/w/wiki.phtml?oldid=53587 - no page name in the URL, goes to the correct page
 * http://meta.wikimedia.org/w/wiki.phtml?title=Help:Link&oldid=53588 - number and name do not correspond; the name is ignored
 * http://meta.wikimedia.org/w/wiki.phtml?title=abc&oldid=53587 - non-existing page name; oldid is ignored, works like going to a non-existing page, except for the links to assumed previous and next versions, and on editing, for the warning of editing an old version of a page.

See also Linking to specific versions of a page.

New pages
Pages are numbered with page_id (see Page table) in order of creation.


 * http://meta.wikimedia.org/w/wiki.phtml?title=x&curid=9906 - gives the page with correct full name

Conversely, most Query API output provides page names as well as page id's, e.g. http://meta.wikimedia.org/w/query.php?titles=Hilfe:Zeitleiste

See also Multiple titles.

From MediaWiki 1.5 page versions get a number "oldid" as soon as they are created; they are produced by variable. The URL is like in the previous section.

Edit
Examples:


 * Edit the whole page: http://meta.wikimedia.org/w/wiki.phtml?title=Help:URL&action=edit
 * Edit the 5th section: http://meta.wikimedia.org/w/wiki.phtml?title=Help:URL&action=edit&section=5
 * Add at the end: http://meta.wikimedia.org/w/wiki.phtml?title=Help:URL&action=edit&section=1000 (use large section number)
 * Ditto with "Post a comment" feature: http://meta.wikimedia.org/w/wiki.phtml?title=Help:URL&action=edit&section=new

Purge
In some cases of caching problems, to update a page it can help to use "action=purge", in a URL like which results in:

Uselang
In some cases it is helpful to link to another Wikimedia project by using the "&uselang" parameter, in a URL like http://commons.wikimedia.org/w/index.php?title=Glavna_stran&uselang=sl. This allows specifying the language (hereby Slovenian) of the interface messages that will be displayed when opening the page 'Glavna stran' in the Commons project.

Miscellaneous actions
You can fetch the raw wikitext of a page using a URL like which results here in:

Other actions are view, watch, unwatch, delete, revert, rollback, unprotect, info, markpatrolled, validate, render, deletetrackback, and history. (These rarely need to be entered explicitly, as the useful ones are prelinked at various tabs and buttons. Several of these actions require administrator privileges. Other users do not have the link; if they try the URL they get the message in MediaWiki:Badaccesstext.)

Kinds of dead links
There can be various kinds of errors in the URL. With some the server is not even reached, with others the server takes some action. The server may also go to the correct page and just ignore a wrong parameter or anchor.


 * http://meta.wikimedia.or/
 * abc
 * http://met.mediawiki.org
 * /abc
 * http://meta.wikimedia.org/w/index.php?title=Help:URL&action=abc
 * http://meta.wikimedia.org/w/index.php?title=Help:URL&act=abc
 * http://meta.wikimedia.org/w/index.php?title=Help:URL#abc
 * http://meta.wikimedia.org/w/index.php?title=Help:URL#abc