Views: 8792
Last Modified: 22.09.2014

Sometimes it may be required to allocate certain website sections as subdomains of the main website. For example, it may be necessary to organize a forum at http://www.mysite.ru/forum/ and not at http://forum.mysite.ru. This can be achieved by using the methods of multisiting in different domains. In this case, the website remains the same and the license is not breached.

Note:

Please remember that you must have a registered third level DNS for this setting.

  • Create a section to be allocated in the subdomain.
  • Configure a separate virtual Apache server for multisiting in different domains (see Examples of Apache Server Settings) linking a domain to the folder created.
  • Create symbolic links to the folders bitrix and upload in this folder.
  • Create a template for the website and apply it.
Note:

In this case, in order to set up different templates for different folders, select a condition to display the PHP expression template and insert the following code:

$_SERVER['HTTP_HOST'] == 'site2'

where site2.com is the domain name for which own template of the website applies.

Note:

On this subdomain website the menu created for the main website cannot be used because the menu of the main website has paths set from the main website. You can either use absolute paths in the menu or create a separate menu for the subdomain website.



Courses developed by Bitrix24