function _hosting_valid_fqdn_subdir in Hosting 6.2
Check if the FQDN provided is valid for subdir alias.
Parameters
$fqdn: The Fully Qualified Domain Name (FQDN) to validate.
Return value
An integer greater than 0 if the $fqdn is valid, or 0 or FALSE if it not valid.
1 call to _hosting_valid_fqdn_subdir()
- hosting_alias_validate_subdir in alias/
hosting_alias.module - Ensure that an alias is valid for subdir site.
File
- ./
hosting.inc, line 66 - General purpose Hosting module functions.
Code
function _hosting_valid_fqdn_subdir($fqdn) {
return preg_match("/^([a-z0-9]([a-z0-9-\\/]*[a-z0-9])?\\.?)+\$/i", $fqdn) && preg_match("/\\//", $fqdn) && !preg_match("/\\/\\//", $fqdn);
}