Wiki source code of Access a wiki

Version 5.1 by Vincent Massol on 2013/05/13

Show last authors
1 By default when you connect to your wiki farm you will go to the main wiki. To be able to access other wikis, XWiki supports two modes.
2
3 {{toc/}}
4
5 = The domain name based wiki access =
6
7 {{info}}
8 This was the default mode until XWiki 3.3 RC1. After the release of XWiki Enterprise 3.3 RC1, the URL path based access mode is used as default.
9 {{/info}}
10
11 In virtual mode you can access any wiki by the [[domain name/alias>>http://en.wikipedia.org/wiki/Domain_Name_System]] registered in its descriptor with the field ##server## ("Alias" in the UI).
12
13 For example if the url is //{{{http://wikiname.xwiki.org/xwiki/bin/view/Space/Page}}}// XWiki will try to find "wikiname.xwiki.org" as a value of the ##server## field in the objects of class ##XWiki.XWikiServerClass##. Then it extracts the last part of the page name to get the wiki identifier: in this case it finds ##XWiki.XWikiServerWikiname## and extracts "wikiname" as the wiki identifier to set the database to query on.
14
15 If no descriptor can be found:
16
17 * if the host is an IP (127.0.0.1, 85.65.12.36, etc.) XWiki selects the main wiki
18 * else, if the first part of the host name (what is before the first point) is "www" XWiki selects the main wiki
19 * else, if the first part of the host name matches a wiki identifier XWiki selects that wiki
20
21 If after all no wiki has been found, then XWiki redirects to the URL configured in the property ##xwiki.virtual.redirect## of ##xwiki.cfg##.
22
23 So to be able to access your wiki you need to configure your DNS or modify hosts file in your operating system (see [[Hosts file documentation on Wikipedia>>http://en.wikipedia.org/wiki/Hosts_file]] for details).
24
25 = The URL path based wiki access =
26
27 {{info}}
28 * This mode is supported only since XWiki Platform 1.7 and XWiki Enterprise Manager 1.5 and only when enabled.
29 * Starting with XWiki 3.3 RC1, this is the default mode.
30 {{/info}}
31
32 When this mode is enabled you can access a wiki using an url like: {{{http://host/xwiki/wiki/wikialias/view/Space/Page}}}.
33 The two parts of ##/wiki/wikialias## mean:
34
35 * ##wiki##: this is used by XWiki to identify the URL as a URL path based multiwiki access. You can configure it in ##xwiki.cfg## with the property ##xwiki.virtual.usepath.servletpath##.(((
36 {{warning}}
37 Don't forget to set the ##xwiki.authentication.logoutpage## property accordingly. Change the "wiki" part in the property value for the right alias.
38 {{/warning}}
39 )))
40 * ##wikialias##: this is used by XWiki to find the wiki descriptor
41 ** first it tries to match ##wikialias## with the descriptors
42 ** if it can't find the descriptor this way it tries to match the wiki descriptor using ##wikialias## as the wiki identifier. This means looking whether the ##XWiki.XWikiServerWikialias## document exists and contains an object of the ##XWiki.XWikiServerClass## class
43
44 If no ##/wiki/wikialias## path is found in the URL then XWiki defaults to the domain-based algorithm.

Get Connected