XWiki - Open Source Wiki and Content-Oriented Application Platform » FAQ » How to change the home page destination?

How to change the home page destination?

Last modified by Evandro Fonseca on 2014/02/14

The short answer is that you can't. However what you can do is modify the content of the home page (i.e. Main.WebHome) so that it displays what you want. You have several options:

  • Option 1: Simply edit Main.WebHome using the wiki editor or the WYSIWYG editor and replace the content by your content
  • Option 2: Include the page you wish to display from the home page, e.g. have the following in Main.WebHome:
    {{include reference="MySpace.MyPage"/}}
  • Option 3: Redirect the home page to your page, using a script, e.g. have the following in Main.WebHome:
    {{velocity}}
    $response.sendRedirect($xwiki.getURL('MySpace.MYPage'))
    {{/velocity}}
  • Option 4: Modify the web.xml file to control what http://<yourserver>/ should redirect to. Specifically, edit WEB-INF/web.xml, locate the section with the servlet responsible for the redirect (the one with the line <servlet-class>com.xpn.xwiki.web.HomePageRedirectServlet</servlet-class>, and change that section to contain something like:
    <servlet>
     <servlet-name>redirectHomeServlet</servlet-name>
     <servlet-class>com.xpn.xwiki.web.HomePageRedirectServlet</servlet-class>
     <init-param>
       <param-name>homePage</param-name>
       <param-value>bin/MySpace/MyPage</param-value>
     </init-param>
    </servlet>
  • Option 5: Keep the dashboard but change the displayed widgets. To do so go to Dashboard.WebHome and edit in inline mode. You can also edit the home page and click the included page in the panel on the right to navigate to Dashboard.WebHome
Tags: redirect
Created by JPaul Goncalves araujo on 2008/04/24

Get Connected