Wiki source code of Access a wiki

Version 3.7 by Manuel Smeria on 2012/12/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 By default this mode is disabled. To enable it, go to ##xwiki.cfg## and set //xwiki.virtual.usepath// to 0.
12
13 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).
14
15 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.
16
17 If no descriptor can be found:
18
19 * if the host is an IP (127.0.0.1, 85.65.12.36, etc.) XWiki selects the main wiki
20 * else, if the first part of the host name (what is before the first point) is "www" XWiki selects the main wiki
21 * else, if the first part of the host name matches a wiki identifier XWiki selects that wiki
22
23 If after all no wiki has been found, then XWiki redirects to the URL configured in the property ##xwiki.virtual.redirect## of ##xwiki.cfg##.
24
25 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).
26
27 = The URL path based wiki access =
28
29 {{info}}
30 * This mode is supported only since XWiki Platform 1.7 and XWiki Enterprise Manager 1.5 and only when enabled.
31 * Starting with XWiki 3.3 RC1, this is the default mode.
32 {{/info}}
33
34 When this mode is enabled you can access a wiki using an url like: {{{http://host/xwiki/wiki/wikialias/view/Space/Page}}}.
35 The two parts of ##/wiki/wikialias## mean:
36
37 * ##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##.
38 (((
39 {{warning}}
40 Don't forget to set the ##xwiki.authentication.logoutpage## property accordingly. Change the "wiki" part in the property value for the right alias.
41 {{/warning}}
42 )))
43 * ##wikialias##: this is used by XWiki to find the wiki descriptor
44 ** first it tries to match ##wikialias## with the descriptors
45 ** 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

Get Connected