php - Check ulr before redirect -
im trying fix site issue on friend's site. let's call "www.original.com". has domain; "www.alias.com". used alias www.original.com.
so here's situation: claims logo used different if entered site www.alias.com. currently, www.alias.com , www.original.com sites identical.
the code has following function:
function check_domain($d){ $domain = filter_input(input_server, 'http_host', filter_sanitize_string); return substr_count($domain, $d); }
and in header makes 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 make check correct again? dns-change made not work?
Comments
Post a Comment