Bitrix Site Manager

CMainPage

CMainPage is the class for use with index page.

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

Methods

MethodDescription
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