Once my joomla site is down how can i redirect to another site.
eg.
**http://localhost:8081/site** (it is orginal site)
if it shows "The page cant be displayed" it should automatically redirect to another site
**http://localhost:8081/site1** (secondary site)
i tryed
<?php
header("http://localhost:8081/site/"); /*LIVE VERSION*/
function Redirect($http://localhost:8081/site/, $permanent = false)
{
if (headers_sent() === false)
{
header('Location: ' . $http://localhost:8081/site/, true, ($permanent === true) ? 301 : 302);
}
exit();
}
Redirect('http:http://localhost:8081/site1/', false);
die();
?>
but it is not work for me.
You can use a function like that:
At the final function use an IF to redirect base to as you want.