Boot Router

Navigation:  Development > System Definition > URI Manager >

Boot Router

Previous pageReturn to chapter overviewNext page

Boot Router define the starting page (Home Page) of the project. It is an XML file that set required parameters
 
/development/definition/uri_manager/boot_router.xml

 

By default it set to index action method of Home controller. Boot router has below two mode. In XML file <type> tag is used to define the mode.

1.Fixed Route

2.Domain Based Route

 

 

Fixed Route
Generally we use fixed route. In this mode we define a particular Controller and Action method to start. See below example:

 
<URIManager>
  <bootrouters>
      <bootrouter>
          <type>Fixed</type>
          <domain>Auto</domain>
          <theme>Auto</theme>
          <controller>home</controller>
          <action>index</action>
      </bootrouter>
  </bootrouters>
</URIManager>

 

For fixed router type(<type>) always set to "Fixed". Domain and Theme values used for Domain based router. Change <controller> and <action> to set new starting page. Action(<action>) tag must not contain "Action" keyword.
 
Domain Based Router
This router used to select Starting Page and Theme based on the Website Domain. See below Example
 
<URIManager>
  <bootrouters>
      <bootrouter>
          <type>Auto</type>
          <!-- Without http://wwww. or https://wwww.  and trailing slash -->
          <domain><![CDATA[example1.com]]></domain>
          <theme>blackrain</theme>
          <controller>home</controller>
          <action>index</action>
      </bootrouter>
      <bootrouter>
          <type>Auto</type>
          <!-- Without http://wwww. or https://wwww.  and trailing slash -->
          <domain><![CDATA[example2.com]]></domain>
          <theme>whitecloud</theme>
          <controller>member</controller>
          <action>login</action>
      </bootrouter>
  </bootrouters>
</URIManager>

 

If require clear cache after changing the XML file.