You are here

function purl_subdomain::detect in Persistent URL 7

Same name and namespace in other branches
  1. 6 includes/purl_subdomain.inc \purl_subdomain::detect()

Detect the the processor value for the current page request

Return value

value that can be pased to the parse step.

Overrides purl_processor::detect

File

includes/purl_subdomain.inc, line 23

Class

purl_subdomain
Subdomain prefixing.

Code

function detect($q) {
  $parts = explode('.', str_replace('http://', '', $_SERVER['HTTP_HOST']));
  return count($parts) > 1 ? array_shift($parts) : NULL;
}