SilverStripe\Subsites\Model\Subsite::getSubsiteIDForDomain
Get a matching subsite for the given host, or for the current HTTP_HOST.
Supports "fuzzy" matching of domains by placing an asterisk at the start of end of the string, for example matching all subdomains on *.example.com with one subsite, and all subdomains on *.example.org on another.
Signature
public function getSubsiteIDForDomain([string
$host = NULL,
[boolean
$checkPermissions = true]] )
Parameters
$host
— string- The host to find the subsite for. If not specified, $_SERVER['HTTP_HOST'] is used.
$checkPermissions
— boolean
Returns
- int
- Subsite ID