Standard URL Scheme

Last modified by Admin on 2024/03/28 10:53

cogStandard format of supported URLs
TypeJAR
Category
Developed by

XWiki Development Team

Rating
0 Votes
LicenseGNU Lesser General Public License 2.1
Bundled With

XWiki Standard

Installable with the Extension Manager

Description

Implementation of the URL API following the Standard XWiki URL scheme (the traditional one). 

Supported URL formats in XWiki 7.2M1+ (we've added support for Nested Spaces):

http://server/context/bin
http://server/context/bin/
http://server/context/bin/space
http://server/context/bin/space/
http://server/context/bin/action
http://server/context/bin/action/space
http://server/context/bin/action/[space]+/
http://server/context/bin/action/[space]+/page
http://server/context/bin/action/[space]+/
http://server/context/bin/action/[space]+/page/attachment.ext
http://server/context/bin/action/[space]+/page?param1=value1&param2=value2
http://server/context/wiki/mywiki/action/...

Supported URL formats prior to XWiki 7.2:

http://server/context/bin
http://server/context/bin/
http://server/context/bin/page
http://server/context/bin/space/
http://server/context/bin/space/page
http://server/context/bin/action/space/
http://server/context/bin/action/space/page
http://server/context/bin/action/space/page/
http://server/context/bin/action/space/page/attachment.ext
http://server/context/bin/action/space/page/ignored/path
http://server/context/bin/action/space/page?param1=value1&param2=value2
http://server/context/wiki/mywiki/action/...

Backward compatibility breakages:

  • Prior to 7.2, it was possible to omit the view action in URLs even when XWiki was configured to show view action (xwiki.showviewaction=1 in xwiki.cfg). Starting with 7.2 you need to xwiki.showviewaction=0 to support this.
  • Prior to 7.2, it was also possible to use xwiki.usedefaultweb=1 in conjunction with xwiki.showviewaction=0 to have short URLs of the type  http://localhost:8080/xwiki/bin/AllDoc. The configuration parameter xwiki.usedefaultweb=1 is no longer working.

See also the Standard URL Format documentation in the Dev Guide, which provides more details.

Configuration

The following can be configured:

#-# [Since 5.1M1]
#-# Defines where the wiki part is defined in a URL pointing to a subwiki
#-# If true then the wiki part is located in the URL path (a.k.a path-based), for example:
#-#   http://server/xwiki/wiki/mywiki/view/Space/Page
#-# If false then the wiki part is located in the URL host domain (a.k.a domain-based), for example:
#-#   http://mywiki.domain/xwiki/bin/view/Space/Page
#-#
#-# The default is:
# url.standard.multiwiki.isPathBased=true

#-# [Since 5.1M1]
#-# For path-based setups, this property defines the path segment before the one identifying the subwiki in the URL.
#-# For example if set to "thewiki", then the following URL will point to a subwiki named "mywiki":
#-#   http://server/xwiki/thewiki/mywiki/view/Space/Page
#-# Note that the mapping in web.xml has to be modified accordingly if you don't use the default value:
#-#   <servlet-mapping>
#-#     <servlet-name>action</servlet-name>
#-#     <url-pattern>/wiki/*</url-pattern>
#-#   </servlet-mapping>
#-#
#-# The default is:
# url.standard.multiwiki.wikiPathPrefix=wiki

#-# [Since 5.2M1]
#-# Defines the URL path prefix used for Entity URLs, i.e. URLs pointing to a Document, Space, Object, etc.
#-# For example this is the "bin" part in the following URL:
#-#   http://server/xwiki/bin/view/space/page
#-# Note that this replaces the old xwiki.defaultservletpath property in the old xwiki.cfg file.
#-#
#-# The default is:
# url.standard.getEntityPathPrefix=bin

Prerequisites & Installation Instructions

We recommend using the Extension Manager to install this extension (Make sure that the text "Installable with the Extension Manager" is displayed at the top right location on this page to know if this extension can be installed with the Extension Manager).

You can also use the manual method which involves dropping the JAR file and all its dependencies into the WEB-INF/lib folder and restarting XWiki.

Dependencies

Dependencies for this extension (org.xwiki.platform:xwiki-platform-url-scheme-standard 16.2.0):

  • org.xwiki.commons:xwiki-commons-configuration-api 16.2.0
  • org.xwiki.platform:xwiki-platform-url-default 16.2.0
  • org.xwiki.platform:xwiki-platform-wiki-api 16.2.0
  • org.xwiki.platform:xwiki-platform-model-api 16.2.0
  • org.xwiki.platform:xwiki-platform-url-container 16.2.0
Tags:
    

Get Connected