title: How to redirect the domain page to another one host?
body: <p>I have designed a dashboard page for monitoring databases also having two servers(different hosts), i need to redirect my dashboard page from one host to another one by checking whether mysql is reachable or not on current host, i have a php code to check the mysql available.</p>
  
  <pre><code> &lt;?php
  
           $host="189.168.81.50";
            $port="3306";
           $dbUsername="appuser";
          $dbPassword="Appuser";
  
  
          $host1="192.168.81.25";
          $port1="3306";
          $dbUsername1="appuser";
          $dbPassword1="Appuser";
  
  
        $link = mysql_connect($host.':'.$port, $dbUsername, $dbPassword);
        $link1 = mysql_connect($host1.':'.$port1, $dbUsername1, $dbPassword1);
  
      if ($link) {
  
      echo "connection 1 successful";
  
        }
  
        if($link1) {
  
         echo "connection 2 successful";
  
         }
  
        ?&gt;
  </code></pre>
  
  <p>here connection one is success then the page should <code>http://189.168.81.50/dashboard</code>but if connection two is suucess then it should be <code>http://192.168.81.25/dashboard</code> and intially consider now on in <code>http://189.168.81.50/dashboard</code></p>