7/13/2023 0 Comments Shorten url and rename it![]() Ensure that URLs that must not be served by the Action Servlet are not modified. There are various alternate to achieve this: /redirect: The XWiki Redirect Servlet used to redirect to the home page when no page is specified in the URL./rest/*: REST resources, served by the XWiki REST Servlet.These need to be served directly as static resources. /resources/* and /skins/*: Statically served resources.However you need to be careful that the following prefixes do NOT go through the Action Servlet (see your web.xml to check their current mappings): Generically speaking, to get rid of /bin/, you need to configure your system so that URLs matching /* are mapped to the Action Servlet (by default only /bin/* URLs are mapped to the Action Servlet). ![]() It identifies the servlet that should process the page, which, for /bin/, is the action servlet. The second part is the hardest part to remove. See Installation using Debian (.DEB) packages. This seemed to work on previous versions but it was actually leading to errors from time to time, depending on what URL was used when doing the first request on the XWiki instance. The reason is that XWiki cannot guess the webapp context from the URL in this case. In addition, starting with XWiki 6.2.8/6.4.3/7.0 you must tell XWiki that it's deployed as ROOT by setting the xwiki.webapppath to empty in your xwiki.cfg configuration file as in: Otherwise you'll get a warning in the console. Remove the jetty/contexts/xwiki.xml file and thus keep only the jetty/contexts/root.xml file.Rename the existing webapps/xwiki directory into webapps/root.Remove the existing webapps/root directory which contains a redirect Servlet that automatically redirects root URLs to the xwiki context.Note that if you're using the Standalone distribution (which packages Jetty and HSQLDB) then you'll also need to: In Jetty, with the default configuration, all it takes is to deploy the XWiki web application in webapps, in a sub directory named root.In Tomcat, with the default configuration, all it takes is to deploy the XWiki web application in webapps, in a sub directory named ROOT (i.e.Deploying as ROOTĪ special case is when deploying XWiki as the ROOT application, which actually allows the application name part to be empty, so an URL can take the form /bin/view/Space/Document.Īchieving this depends on the container, as there's no standard regarding the ROOT application (Refer to your container's documentation for more details). For example on Tomcat it's enough to simply deploy the XWiki webapp in the webapps directory, in a sub directory named after the application name you wish to use (e.g. To change it you must refer to your container's documentation and find how to map the context path of a web application. It identifies the application that should process the request, and it allows a container to host more than one application. The /xwiki/ part of the URL is the application name. A short URL is an URL without the xwiki/bin/view parts.
0 Comments
Leave a Reply. |