2 Şubat 2014 Pazar

(fonksiyon ile çözüm) kaynak dosya sadece index phpden include edilince çalışsın

kaynak : http://pastebin.com/KdT43r9j


    if (strstr($_SERVER['REQUEST_URI'],'index.php')) {
        header('HTTP/1.0 404 Not Found');
    }
           
    if (strstr($_SERVER['REQUEST_URI'],'index.php')){
        header('HTTP/1.0 404 Not Found');
        echo "<h1>404 Not Found</h1>";
        echo "The page that you have requested could not be found.";
        exit();
    }
           
    if(strstr($_SERVER['REQUEST_URI'],'index.php')){
      header('HTTP/1.0 404 Not Found');
      readfile('404missing.html');
      exit();
    }
           
    <?php
    header($_SERVER["SERVER_PROTOCOL"]." 404 Not Found");
    header("Status: 404 Not Found");
    $_SERVER['REDIRECT_STATUS'] = 404;
    ?> <!-- 404 contents below this line -->
           
    if (strstr($_SERVER['REQUEST_URI'],'index.php')){
      header('HTTP/1.0 404 Not Found');
      exit("<h1>404 Not Found</h1>nThe page that you have requested could not be found.");
    }
           
    if($_SERVER['PHP_SELF'] == '/index.php'){
       header('HTTP/1.0 404 Not Found');
       echo "<h1>404 Not Found</h1>";
       echo "The page that you have requested could not be found.";
       die;
    }
           
    header($_SERVER["SERVER_PROTOCOL"]." 404 Not Found");
    header("Status: 404 Not Found");
    $_SERVER['REDIRECT_STATUS'] = 404;
    //If you don't know which web page is in use, use any page that doesn't exists
    $handle = curl_init('http://'. $_SERVER["HTTP_HOST"] .'/404missing.html');
    curl_exec($handle);
           
    if (<no file found>){
            die("NO FILE HERE");
        }
           
    header('HTTP/1.0 404 Not Found');
        die("NO FILE HERE");
           
    $uri=$_SERVER['REQUEST_URI'];
            $strpos=strpos($uri, '.php');
            if ($strpos!==false){
            $e404="The page requested by you: &quot".$_SERVER['REQUEST_URI']."&quot, doesn't exists on this server.";
            $maybe=str_replace('.php','',$uri);
            $maybe=str_replace('/','',$maybe);
            die("<center><h1>404</h1><hr><h3>$e404</h3><h3>Maybe try <a href=$maybe>www.leaveyortexthere.p.ht/$maybe</a>?</center>");
    }
           
    header("Status: 404 Not Found");
    header('HTTP/1.0 404 Not Found');
           
    echo '<iframe src="/something-bogus" width="100%" height="100%" frameBorder="0" border="0" scrolling="no"></iframe>';

Hiç yorum yok:

Yorum Gönder