Views: 8862
Last Modified: 22.09.2014

Before setting up the system to make it work with several sites you have to create a new site. It is made in the Administrative Section on the page Websites (Control Panel > Settings > System settings > Websites > Websites). At the time of adding an entry about the new site to the site table, please indicate the following parameters:

  • ID – a 2-digit combination, e.g. lt, en, de, s1, s2 etc.
  • Name – an arbitrary name of the website; together with the site ID it is used in different administrative forms to indicate binding to a specific site.
  • Domain – domain names which correspond to this site are indicated.
Note:

Domain names are set in a separate line (one name per line).

Each domain name is a «mask», i.e. may include subdomains. E.g., the following sites can be selected by the name site.com: www.site.com or www1.site.com, and my-site.com. In this case site.com is partially included in all three domain names.

In version 11 or later, the use of Cyrillic domain names is possible.


Important!

Be careful when indicating the domain names of the site. In case the site uses cookies and domain names are indicated incorrectly, then while the user sees the pages of your site, the other site (which domain name is indicated by error) will also be accessed.

If the site which domain name is indicated by error provides for pop-up windows, visitors of your site will also see these pop-up windows.

For example, if for the site http://demo.bitrixsoft.com/ instead of demo.bitrixsoft.com demo.bitirxsoft.com (error in the position of the second i) is typed, the following code will be added to the page code of the site http://demo.bitrixsoft.com/:

<IMG style="width:0px; height:0px; border: 0px" 
src="http://demo.bitirxsoft.com/bitrix/spread.php?
s=QklUUklYX1NNX0dVRVNUX0lEATk5NDgBMTE5MTU5NDU0OAEvAQECQklUUkl
YX1NNX0xBU1RfVklTSVQBMTAuMTAuMjAwNiAxODoyOTowOAExMTkxNTk0NTQ4AS8BAQI%3D&
k=9e8de698c64709edf2e76202279ce889"></IMG>

As a result, visitors of the site http://demo.bitrixsoft.com/ will be shown pop-up windows of the site with the domain name demo.bitirxsoft.com.


Note:

In order to avoid problems in case the domain names of different sites partially coincide, use site sorting index. In this case, when a site is selected by domain name the sorting index will be compared and the site with the lesser index value will be used.

If the sorting index value coincides, the verification will be made according to the length of the domain name.

  • Site folder – a folder is set where information content of the site, its sections and pages are located.

    The indicated value is used as a reference level to build logical and physical structure in the structure management module.

  • Sorting index - a numeric parameter is indicated which determines the order of the site in the general list.

    In a number of cases, when adding a second site, the templates indicated for such second site may become inapplicable. The problem is caused by a special mechanism of site selection. Thus, if the name of the second site (e.g., test.site.org) contains the name of the first site (site.org), and the sorting value of the second site is bigger than that of the first site, the templates will be applied to the second site from the first. When using such names, indicate a smaller sorting value for the second site compared with that of the first site.

In the Parameters sections, the language settings of the site are determined. Also, the following values are set:

  • Website name – an arbitrary name of the website which can be used in mail templates. If the value is not set in the site parameters, the value of the same name parameter from the kernel module settings will be used.
  • Server URL – the set server address will be used when forming mail messages based on the templates. The address will be indicated without http://. If the value is not set in site settings, the value of the same name from the kernel module settings will be used.
  • Default Email address – an email address will be set which will be used as a macros value DEFAULT_EMAIL_FROM when forming mail messages for each server. If this field is not completed for the site, the template will use the mail address indicated in the settings of the kernel module.
  • Path to the web server root folder of this site – a full path to the folder for which the variable DOCUMENT_ROOT is set up for this site shall be indicated. In order to facilitate the insertion of the full path into this filed, the link «insert current» can be used. In this case, a full path to files of the current site on the server will be automatically inserted.
Attention:

This possibility of inserting the current path should be used only when you actually are on the website for which the value is being inserted.

For example, while in the administrative section, when coming from site1.com/bitrix/admin the path value exactly for this site will be inserted:

  • /home/public_html/site1/
In order to set the current value for site2.com you have to go to the administrative part of site2.com/bitrix/admin.
In this case, the following path value will be inserted:
  • /home/public_html/site2/
  • Create Email templates – an option to create or bind mail templates; it is available only when creating a new site:
    • do not create – no site templates will be created;
    • link to existing site templates – a possibility is offered to link the site to the current templates for one of the sites;
    • copy from site templates – site templates will be copied for the indicated site from the relevant templates for the selected site.


Courses developed by Bitrix24