From Wikiafripedia, the free encyclopedia that you can monetize your contributions or browse at zero-rating.
Jump to navigation Jump to search

Like all pages on the World Wide Web, the pages delivered by Wikimedia's servers have URLs to identify them. These are the addresses that appear in your browser's address bar when you view a page. Wikiafripedia editors also have the ability to create hyperlinks to chosen URLs, pointing to pages either within Wikiafripedia and other Wikimedia projects, or elsewhere on the Web.

Linking to URLs[edit source | edit]

When editing a page, hyperlinks to other pages within Wikiafripedia (or other Wikimedia projects) are normally made as wikilinks or interwikilinks, using the [[...]] syntax described at Help:Link. However if you want to link to an outside website, or to certain specially generated Wikimedia pages (such as a past version of an article), it is necessary to provide the full URL. This is done using external link syntax.

There are three forms of external link syntax:

  • If the URL is simply included in the wikitext, without square brackets, then it appears as written, and a hyperlink is created: produces
  • If the URL is placed in square brackets, then a hyperlink is created with a serial number as its label: [] gives [1]
  • If the URL is placed in square brackets followed by a space and some text, then that text is used as the label for the hyperlink: [ Wikimedia] gives Wikimedia

Making a link to elsewhere on the same server as the wiki can be simplified by using {{SERVER}}. Example: [{{SERVER}}/relative/url].

To suppress the external link icon, place the external link between <span class="plainlinks">...</span> tags.

Fixing links with unsupported characters[edit source | edit]

  • The URL must start with a supported URI scheme. http:// and https:// are always supported. gopher://, irc://, ircs://, ftp://, news://, nntp://, worldwind://, telnet://, svn://, git://, mms:// and mailto: will create a link and an icon but require an agent registered in the browser.
  • URLs containing certain characters will display and link incorrectly unless those characters are percent-encoded. For example, a space must be replaced by %20 (this can be done using the PATH option of the {{urlencode:}} parser function).
sp " ' , ; < > ? [ ] { | }
%20 %22 %27 %2C %3B %3C %3E %3F %5B %5D %7B %7C %7D
Single apostrophes do not need to be encoded; but unencoded multiples will be parsed as italic or bold markup
  • Titles containing certain characters will display and link incorrectly unless those characters are encoded with HTML character references.
newline [ ] |
space &#91; &#93; &#124;
  • Even though PHP's urlencode() automatically percent-encodes them, these characters do not get URL-encoded by wfUrlencode(). The ":" symbol is a partial exception - it is not encoded anywhere except for IIS 7.0.
; @ $ ! * ( ) , / ~ :
%3B %40 %24 %21 %2A %28 %29 %2C %2F %7E %3A

Dropping http: and https:[edit source | edit]

If you make an external style link using square brackets [...] from a Wikimedia page to other Wikimedia page, including Wikiafripedia of course, it's better to drop the protocol http: or https:, so that the URL begins with //..., e.g. //

Otherwise, readers are forced to use the specified connection method. If you don't specify the protocol, readers can continue to use the protocol to read that page.

The URL returned by {{SERVER}} magic word begins with //.

  • Example: [// no protocol]
  • Result: no protocol (Read this page both with http and https.)
  • Example: [{{SERVER}}/w/index.php?title=Help:URL no protocol]
  • Result: no protocol (Read this page both with http and https.)

URLs of Wikiafripedia pages[edit source | edit]

English Wikiafripedia's URLs begin That address on its own is redirected to the Main Page.

The page name may include a namespace prefix (such as "Help:" in this page). With some special pages it may also include a parameter, as in (but for most special page parameters, see below).

Other URLs associated with a page are constructed by adding a query string. The string can be added to either of the above forms (as in ), but in this case the system defaults to the second form, i.e. it extends the index.php query string "title=Page_name".

Extended URLs are used:

If constructing URLs for Wikiafripedia pages, remember to convert spaces into underscores, and to percent-code special characters where necessary, as described in the previous section. (For how to do this in template code, see Templates and programming below.)

Various kinds of error message may appear if an invalid URL, or one to which you do not have access, is submitted. In other cases the URL may redirect to a valid one (for example, page titles are converted to their canonical form as they are when they appear in wikilinks).

Shorter URL[edit source | edit]

An unofficial redirect site mentioned at User:Tl-lomas/ offers two types of shorter URL.

The first form is not controlled by the Wikimedia Foundation, so it could stop working or change purpose at any time.

The second form also works like TinyURL to make a long page name into a short code. It uses pageid, which remains accurate even if the page name is moved. Pageid has up to 8 digits, shown by clicking "Page information" under "tools" on the left side of the page.

URLs on other Wikimedia projects[edit source | edit]

Other projects use similar URLs to those of English Wikiafripedia, except that the domain names vary: (Meta), (French Wikiafripedia), (German Wiktionary), etc.

Note that leads to an international Wikiafripedia portal page, but other URLs beginning with that prefix redirect to English Wikiafripedia.

Other projects may also use different strings in place of "/w/" and "/wiki/" in URLs. For details, see the URL help page on Meta.

Templates and programming[edit source | edit]

For use in templates, correct URLs can be constructed using certain magic words and parser functions such as fullurl, urlencode and others. Details of these can be found at mw:Help:Magic words.

Most programmatic interaction with Wikiafripedia can be performed most efficiently using the API, for which URLs beginning are used. For details, see mw:API.

See also[edit source | edit]