Bitrix Site Manager


CMainPage is the class for use with index page.

Methods of this class are used if the sites use method 1 to make multiple sites environment.


GetSiteByHost Returns site ID, defining it by the current host.
GetSiteByAcceptLanguage Returns the site ID by the Accept-Language variable in the user browser settings.
RedirectToSite Redirects to the index page.
GetIncludeSitePage Returns the absolute path to the index page of the specified site, for further inclusion using require() or include().

See Also