URLs in external linksA link in external link style can be of the forms:
The target is a URL which can start with "http://" or "ftp://"; "file://" does not work by default. If enabled it only works in MSIE. To enable it, add a $wgUrlProtocols entry to LocalSettings.php; see the $wgUrlProtocols in DefaultSettings.php for example. All characters of the URL must be among: A-Z a-z 0-9 ._\/~%-+&#?!=()@ If a URL contains a different character it should be converted; for example, ^ has to be written %5e, the hexadecimal ASCII value with a percent sign in front. A blank space can also be converted into an underscore. Conversion:
" # $ % & ' ( ) * , : ;
%20 %22 %23 %24 %25 %26 %27 %28 %29 %2a %2c %3a %3b
< > ? [ ] ^ ` { | }
%3c %3e %3f %5b %5d %5e %60 %7b %7c %7d
For the other characters either the code or the character can be used in internal and external links, they are equivalent. The system does a conversion when needed. E.g. [[%C3%80_propos_de_M%C3%A9ta]] is rendered as À_propos_de_Méta, almost like À propos de Méta, which leads to this page on Meta with in the address bar the URL http://meta.wikipedia.org/wiki/%C3%80_propos_de_M%C3%A9ta while http://meta.wikipedia.org/wiki/À_propos_de_Méta leads to the same. See also (in Wikipedia): Internationalized domain names and Punycode. Percent-encodingFor ASCII characters (up to decimal 127, hex. 7F) percent-encoding simply means adding % to the hex. value, e.g. for a tilde ~ (decimal 126, hex. 7E) it's %7E. Otherwise (non-ASCII) convert it first to UTF-8 and then percent-encode it. Example:
URLs of pages within the projectsSee w:Wikipedia:URLs. On other projects everything works the same, except that the domain names vary:
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.:
The default is /wiki/wiki.phtml, with in DefaultSetting.php [2]:
$wgScriptPath = "/wiki";
$wgScript = "{$wgScriptPath}/wiki.phtml";
There may be other variations, compare: Use in templatesFor 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={{{1}}} This requires {{{1}}} to be written with underscores and escape codes (if applicable). To benefit from the conversion carried out by fullurl, two parameters are needed: {{fullurl:{{{1}}}|{{{2}}}}} (see Template talk:Url 2p). An example with the second parameter in fullurl fixed is Template:ed (backlinks, ) containing the link [{{fullurl:Template:{{{1}}}|action=edit}} {{MediaWiki:Edit}} {{{2|{{{1}}}}}}]. 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 pagesAll 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.
See also Linking to specific versions of a page. New pagesPages are numbered with page_id (see m:page table) in order of creation.
Conversely, most query output provides page names as well as page id's, e.g. http://meta.wikimedia.org/w/query.php?titles=Hilfe:Zeitleiste See also m:Multiple titles. From MediaWiki 1.5 page versions get a number "oldid" as soon as they are created; they are produced by variable {{REVISIONID}}. The URL is like in the previous section. EditExamples:
PurgeIn some cases of caching problems, to update a page it can help to use "action=purge", in a URL like http://en.wikipedia.org/w/index.php?title=Help:URL&action=purge MiscellaneousYou can fetch the raw wikitext of a page using a URL like http://en.wikipedia.org/w/index.php?title=Help:URL&action=raw . 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 linksThere 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.
See also
Wikipedia-specific helpThis page is a copy of the master help page at Meta (for general help information all Wikimedia projects can use), with two Wikipedia-specific templates inserted. To update the main text, edit the master help page for all projects at m:Help:URL. For Wikipedia-specific issues, use Template:Ph:URL (the extra text at the bottom of this page) or Template:Phh:URL for a Wikipedia-specific lead (text appears at the top of this page). You are welcome to replace the full wikitext of this page with that of the master page at Meta at any time. To view this page in other languages see the master page at Meta.
| |