$day_of_week = date('l'); $domain_components = explode(".", $_SERVER['HTTP_HOST']); $domain = $domain_components[count($domain_components) - 2]; $todays_domain = 'aforgettable'.strtolower($day_of_week); if ($domain != $todays_domain) { header('Location: https://www.'.$todays_domain.'.com/'); return; } ?>