02-02-16, 11:52 AM
PHP كود :
<?php
$page = 'https://www.google.jo/index.html';
$page2 = 'https://www.yahoo.com';
$file_headers = @get_headers($page);
if($file_headers[0] == 'HTTP/1.0 404 Not Found') {
header( "Location: $page2" );
}
else {
header( "Location: $page" );
}
?>