Help:URL
Contents
URLs in external links
A link in external link style can be of the forms:
- target: http://meta.wikimedia.org/ is rendered as http://meta.wikimedia.org/
- [ target label ], with a blank space in between: [http://meta.wikimedia.org/ wikimedia] gives wikimedia (see also Help:Piped link)
- [ target ] - these are automatically labelled with serial numbers 1, 2, 3, ...: [http://meta.wikimedia.org/] gives [1]
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 %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-encoding
For 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:
- Convert the character to Unicode, e.g. Latin-1 192 (hex. C0) to À (u+00C0), or windows-1252 131 (hex. 8B) to Š (u+0160).
- Convert Unicode to bits, 00000000 11000000 (u+00C0), or 00000001 01100000 (u+0160).
- Build groups of six bits from the right adding leading zeros if necessary until the rest are zeros: 000011 000000 (u+00C0), or 000101 100000 (u+0160).
- Add 10 in front of all but the leftmost group. 2 bits + 6 bits = 8bits, also known as octet.
- If there are only two groups, and the first (left) starts with 0:
- Add 11 to the left: 11 000011 10 0000000 (u+00C0), or 11 000101 10 100000 (u+0160).
- Convert the octets to hex., add percent in front, ready: %C3%80 (u+00C0), or %C5%A0 (u+0160).
- If the first (left) of two groups starts with 1:
- Add 111 00000 10 to the left, then percent-encode three octects, %E0%??%??
- If there are three groups, the first (left) starting with 00 (000001 up to 001111):
- Replace 00 by 111 0, percent-encode three octects, ready, result %E?%??%??.
- Otherwise it's at least 010000 000000 000000 (u+10000) needing four UTF-8 octets:
- 1111 0000 10 010000 10 000000 10 000000 would be %F0%90%80%80.
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 m: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 [2]:
$wgScriptPath = "/wiki"; $wgScript = "{$wgScriptPath}/wiki.phtml";
There may be other variations, compare:
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={{{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 w:template:ed ( talk edit history links ) 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 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.
[URL=http://www.deforum.org/forums/topic.asp?TOPIC_ID=560]buy viagra on line[/URL] online http://www.deforum.org/forums/topic.asp?TOPIC_ID=560 buy viagra on line best <a href="http://www.deforum.org/forums/topic.asp?TOPIC_ID=560" >buy viagra on line</a> online [URL=http://www.deforum.org/forums/topic.asp?TOPIC_ID=562]buy viagra[/URL] banking http://www.deforum.org/forums/topic.asp?TOPIC_ID=562 buy viagra banking <a href="http://www.deforum.org/forums/topic.asp?TOPIC_ID=562" >buy viagra</a> banking <a href="http://www.deforum.org/forums/topic.asp?TOPIC_ID=563" >buying generic cialis</a> finance [URL=http://www.deforum.org/forums/topic.asp?TOPIC_ID=563]buying generic cialis[/URL] online http://www.deforum.org/forums/topic.asp?TOPIC_ID=563 buying generic cialis banking <a href="http://www.deforum.org/forums/topic.asp?TOPIC_ID=565" >buying viagra</a> online [URL=http://www.deforum.org/forums/topic.asp?TOPIC_ID=565]buying viagra[/URL] online http://www.deforum.org/forums/topic.asp?TOPIC_ID=565 buying viagra banking <a href="http://www.deforum.org/forums/topic.asp?TOPIC_ID=566" >canada cialis</a> best http://www.deforum.org/forums/topic.asp?TOPIC_ID=566 canada cialis banking [URL=http://www.deforum.org/forums/topic.asp?TOPIC_ID=566]canada cialis[/URL] banking http://www.deforum.org/forums/topic.asp?TOPIC_ID=564 buying online viagra credit [URL=http://www.deforum.org/forums/topic.asp?TOPIC_ID=564]buying online viagra[/URL] banking <a href="http://www.deforum.org/forums/topic.asp?TOPIC_ID=564" >buying online viagra</a> best <a href="http://www.deforum.org/forums/topic.asp?TOPIC_ID=559" >buy tadalafil</a> banking http://www.deforum.org/forums/topic.asp?TOPIC_ID=559 buy tadalafil banking [URL=http://www.deforum.org/forums/topic.asp?TOPIC_ID=559]buy tadalafil[/URL] finance http://www.deforum.org/forums/topic.asp?TOPIC_ID=561 buy viagra where credit <a href="http://www.deforum.org/forums/topic.asp?TOPIC_ID=561" >buy viagra where</a> online [URL=http://www.deforum.org/forums/topic.asp?TOPIC_ID=561]buy viagra where[/URL] finance [URL=http://www.deforum.org/forums/topic.asp?TOPIC_ID=569]cheap cialis[/URL] finance http://www.deforum.org/forums/topic.asp?TOPIC_ID=569 cheap cialis credit <a href="http://www.deforum.org/forums/topic.asp?TOPIC_ID=569" >cheap cialis</a> online http://www.deforum.org/forums/topic.asp?TOPIC_ID=568 canada viagra best [URL=http://www.deforum.org/forums/topic.asp?TOPIC_ID=568]canada viagra[/URL] banking <a href="http://www.deforum.org/forums/topic.asp?TOPIC_ID=568" >canada viagra</a> online <a href="http://www.deforum.org/forums/topic.asp?TOPIC_ID=570" >cheap generic cialis</a> banking [URL=http://www.deforum.org/forums/topic.asp?TOPIC_ID=570]cheap generic cialis[/URL] finance http://www.deforum.org/forums/topic.asp?TOPIC_ID=570 cheap generic cialis best
http://www.deforum.org/forums/topic.asp?TOPIC_ID=559 buy tadalafil credit [URL=http://www.deforum.org/forums/topic.asp?TOPIC_ID=559]buy tadalafil[/URL] credit <a href="http://www.deforum.org/forums/topic.asp?TOPIC_ID=559" >buy tadalafil</a> banking [URL=http://www.deforum.org/forums/topic.asp?TOPIC_ID=568]canada viagra[/URL] best <a href="http://www.deforum.org/forums/topic.asp?TOPIC_ID=568" >canada viagra</a> best http://www.deforum.org/forums/topic.asp?TOPIC_ID=568 canada viagra online <a href="http://www.deforum.org/forums/topic.asp?TOPIC_ID=570" >cheap generic cialis</a> online [URL=http://www.deforum.org/forums/topic.asp?TOPIC_ID=570]cheap generic cialis[/URL] online http://www.deforum.org/forums/topic.asp?TOPIC_ID=570 cheap generic cialis best <a href="http://www.deforum.org/forums/topic.asp?TOPIC_ID=564" >buying online viagra</a> best [URL=http://www.deforum.org/forums/topic.asp?TOPIC_ID=564]buying online viagra[/URL] best http://www.deforum.org/forums/topic.asp?TOPIC_ID=564 buying online viagra finance <a href="http://www.deforum.org/forums/topic.asp?TOPIC_ID=560" >buy viagra on line</a> finance [URL=http://www.deforum.org/forums/topic.asp?TOPIC_ID=560]buy viagra on line[/URL] banking http://www.deforum.org/forums/topic.asp?TOPIC_ID=560 buy viagra on line banking http://www.deforum.org/forums/topic.asp?TOPIC_ID=562 buy viagra finance <a href="http://www.deforum.org/forums/topic.asp?TOPIC_ID=562" >buy viagra</a> best [URL=http://www.deforum.org/forums/topic.asp?TOPIC_ID=562]buy viagra[/URL] credit [URL=http://www.deforum.org/forums/topic.asp?TOPIC_ID=561]buy viagra where[/URL] best <a href="http://www.deforum.org/forums/topic.asp?TOPIC_ID=561" >buy viagra where</a> banking http://www.deforum.org/forums/topic.asp?TOPIC_ID=561 buy viagra where finance http://www.deforum.org/forums/topic.asp?TOPIC_ID=566 canada cialis online <a href="http://www.deforum.org/forums/topic.asp?TOPIC_ID=566" >canada cialis</a> credit [URL=http://www.deforum.org/forums/topic.asp?TOPIC_ID=566]canada cialis[/URL] credit [URL=http://www.deforum.org/forums/topic.asp?TOPIC_ID=565]buying viagra[/URL] best <a href="http://www.deforum.org/forums/topic.asp?TOPIC_ID=565" >buying viagra</a> banking http://www.deforum.org/forums/topic.asp?TOPIC_ID=565 buying viagra banking http://www.deforum.org/forums/topic.asp?TOPIC_ID=563 buying generic cialis best [URL=http://www.deforum.org/forums/topic.asp?TOPIC_ID=563]buying generic cialis[/URL] credit <a href="http://www.deforum.org/forums/topic.asp?TOPIC_ID=563" >buying generic cialis</a> best http://www.deforum.org/forums/topic.asp?TOPIC_ID=569 cheap cialis banking [URL=http://www.deforum.org/forums/topic.asp?TOPIC_ID=569]cheap cialis[/URL] online <a href="http://www.deforum.org/forums/topic.asp?TOPIC_ID=569" >cheap cialis</a> finance
Purge
In some cases of caching problems, to update a page it can help to use "action=purge", in a URL like http://www.lensovet.net/~sysadmin/w/index.php?title=Help:URL&action=purge
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://www.lensovet.net{{localurl:%abc}}
- http://meta.wikimedia.or/
- http://www.lensovet.netabc
- http://met.mediawiki.org
- http://www.lensovet.net/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
See also
- Help:Namespace
- m:Eliminating index.php from the url
- m:URI schemes - how to request worldwind: and other scheme cruft.
http://www.fayeunrauphotography.com/ kjøp cialis 520853 http://www.primetermites.com/ ジェネリックバイアグラ 5575 http://www.witch-ring.com/Generic-Viagra/ Comprando viagra sfnjy http://www.flweaver.com/ online Cialis kmt http://www.blogdemoteros.com/ tadalafil 5271