You are here

function hosting_subdirs_hosting_site_domain_alter in Hosting 7.4

Same name and namespace in other branches
  1. 7.3 subdirs/hosting_subdirs.module \hosting_subdirs_hosting_site_domain_alter()

Implements hook_hosting_site_domain_alter().

File

subdirs/hosting_subdirs.module, line 92
Allow sites to be installed in subdirectories.

Code

function hosting_subdirs_hosting_site_domain_alter(&$domain) {
  if (hosting_subdirs_is_a_subdir($domain)) {

    // Rewrite the subdirectory as a subdomain.
    $domain = implode('.', array_reverse(explode('/', $domain)));
  }
}