Im trying to fix a site issue on my friend's site. Let's call it "www.original.com". He also has another domain; "www.alias.com". This is used as an alias for www.original.com.
So here's the situation: He claims that the logo used to be different if you entered the site from www.alias.com. Currently, the www.alias.com and www.original.com sites are identical.
The code has the following function:
function check_domain($d){
$domain = filter_input(INPUT_SERVER, 'HTTP_HOST', FILTER_SANITIZE_STRING);
return substr_count($domain, $d);
}
And in the header it makes the following check:
<?php if (check_domain('original')): ?>
<a href="<?php bloginfo('url'); ?>" id="logo"><img src="images/logo.png" alt="<?php bloginfo('name'); ?>"></a>
<?php elseif (check_domaine('alias')): ?>
<a href="<?php bloginfo('url'); ?>" id="logo-X"><img src="images/logo_X.png" alt="<?php bloginfo('name'); ?>"></a>
How can i make the check correct again? Is it a DNS-change that made this not work?