Dear visitor, in case we do not cover a topic you are looking for, then feel free to ask in our freshly created forum for IT-professionals for a solution. We hope our visitors can help you out with your questions. Have a good one. ~ Tom.

PHP redirect to a domain if the called domain is equal to another domain

Question: Is it possible to redirect a user opening a domain to a different domain through the use of PHP?
Say the user goes to and I want to redirect them to, how would I do so without the use of a meta refresh? Possible?

$host = $_SERVER['HTTP_HOST'];$hosts array(
    '' ,
    '' ,
    '' ,
    '' ,    '' ,    '' ,    '' ,    '' ,    '' ,    '' ,    '' ,    '' ,    ''    );if(in_array($host, $hosts)) {    header('Location:');}

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.