<?php
function curPageURL() {
    $pageURL = 'http';
    if ($_SERVER["HTTPS"] == "on") {$pageURL .= "s";}
    $pageURL .= "://";
    if ($_SERVER["SERVER_PORT"] != "80") {
    $pageURL .= $_SERVER["SERVER_NAME"].":".$_SERVER["SERVER_PORT"].$_SERVER["REQUEST_URI"];
    } else {
    $pageURL .= $_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"];
    }
    return $pageURL;
}

$url = curPageURL();
$content = false;
if ($url == 'http://locandaorta.com/') { $content = file_get_contents('.///index.html'); } 
if ($url == 'http://www.locandaorta.com/') { $content = file_get_contents('.///index.html'); } 
if ($url == 'https://www.locandaorta.com/') { $content = file_get_contents('.///old_index.html.html'); } 
if ($url == 'http://www.locandaorta.com/en/') { $content = file_get_contents('.//en//old_index.html.html'); } 
if ($url == 'http://locandaorta.com/en/') { $content = file_get_contents('.//en//old_index.html.html'); } 
if ($url == 'https://www.locandaorta.com/hotel/') { $content = file_get_contents('.//hotel//old_index.html.html'); } 
if ($url == 'https://www.locandaorta.com/camere-classic-locanda/') { $content = file_get_contents('.//camere-classic-locanda//old_index.html.html'); } 
if ($url == 'https://www.locandaorta.com/camere-tradition-locanda/') { $content = file_get_contents('.//camere-tradition-locanda//old_index.html.html'); } 
if ($url == 'https://www.locandaorta.com/camere-elegance-locanda/') { $content = file_get_contents('.//camere-elegance-locanda//old_index.html.html'); } 
if ($url == 'https://www.locandaorta.com/booking-locanda-di-orta/') { $content = file_get_contents('.//booking-locanda-di-orta//old_index.html.html'); } 
if ($url == 'https://www.locandaorta.com/ristorante-gourmet-locanda-di-orta/') { $content = file_get_contents('.//ristorante-gourmet-locanda-di-orta//old_index.html.html'); } 
if ($url == 'https://www.locandaorta.com/ristorante-la-terrazza/') { $content = file_get_contents('.//ristorante-la-terrazza//old_index.html.html'); } 
if ($url == 'https://www.locandaorta.com/le-guide-e-i-riconoscimenti/') { $content = file_get_contents('.//le-guide-e-i-riconoscimenti//old_index.html.html'); } 
if ($url == 'https://www.locandaorta.com/menu-aprile-locanda-di-orta/') { $content = file_get_contents('.//menu-aprile-locanda-di-orta//old_index.html.html'); } 
if ($url == 'https://www.locandaorta.com/contatti-locanda-di-orta/') { $content = file_get_contents('.//contatti-locanda-di-orta//old_index.html.html'); } 
if ($url == 'https://www.locandaorta.com/magazine/') { $content = file_get_contents('.//magazine//old_index.html.html'); } 
if ($url == 'https://www.locandaorta.com/come-arrivare-alla-locanda-di-orta/') { $content = file_get_contents('.//come-arrivare-alla-locanda-di-orta//old_index.html.html'); } 
if ($url == 'https://www.locandaorta.com/booking/') { $content = file_get_contents('.//booking//old_index.html.html'); } 
if ($url == 'https://www.locandaorta.com/privacy-policy/') { $content = file_get_contents('.//privacy-policy//old_index.html.html'); } 
if ($url == 'https://www.locandaorta.com/en/') { $content = file_get_contents('.//en//old_index.html.html'); } 
if ($url == 'https://www.locandaorta.com/chef-andrea-monesi/') { $content = file_get_contents('.//chef-andrea-monesi//old_index.html.html'); } 
if ($url == 'https://www.locandaorta.com/?p=2058') { $content = file_get_contents('.///?p=2058.html'); } 
if ($url == 'https://www.locandaorta.com/en/hotel-la-locanda-di-orta/') { $content = file_get_contents('.//en/hotel-la-locanda-di-orta//old_index.html.html'); } 
if ($url == 'https://www.locandaorta.com/menu-di-capodanno-locanda-di-orta-2020/') { $content = file_get_contents('.//menu-di-capodanno-locanda-di-orta-2020//old_index.html.html'); } 
if ($url == 'https://www.locandaorta.com/?p=27') { $content = file_get_contents('.///?p=27.html'); } 
if ($url == 'http://www.locandaorta.com/camere-classic-locanda/') { $content = file_get_contents('.//camere-classic-locanda//old_index.html.html'); } 
if ($url == 'http://locandaorta.com/camere-classic-locanda/') { $content = file_get_contents('.//camere-classic-locanda//old_index.html.html'); } 
if ($url == 'http://www.locandaorta.com/camere-locanda/') { $content = file_get_contents('.//camere-locanda//old_index.html.html'); } 
if ($url == 'http://locandaorta.com/camere-locanda/') { $content = file_get_contents('.//camere-locanda//old_index.html.html'); } 
if ($url == 'http://www.locandaorta.com/camere-tradition-locanda/') { $content = file_get_contents('.//camere-tradition-locanda//old_index.html.html'); } 
if ($url == 'http://locandaorta.com/camere-tradition-locanda/') { $content = file_get_contents('.//camere-tradition-locanda//old_index.html.html'); } 
if ($url == 'http://www.locandaorta.com/ristorante-gourmet-locanda-di-orta/') { $content = file_get_contents('.//ristorante-gourmet-locanda-di-orta//old_index.html.html'); } 
if ($url == 'http://locandaorta.com/ristorante-gourmet-locanda-di-orta/') { $content = file_get_contents('.//ristorante-gourmet-locanda-di-orta//old_index.html.html'); } 
if ($url == 'http://www.locandaorta.com/ristorante-la-terrazza/') { $content = file_get_contents('.//ristorante-la-terrazza//old_index.html.html'); } 
if ($url == 'http://locandaorta.com/ristorante-la-terrazza/') { $content = file_get_contents('.//ristorante-la-terrazza//old_index.html.html'); } 
if ($url == 'http://www.locandaorta.com/menu/') { $content = file_get_contents('.//menu//old_index.html.html'); } 
if ($url == 'http://locandaorta.com/menu/') { $content = file_get_contents('.//menu//old_index.html.html'); } 
if ($url == 'http://www.locandaorta.com/menu-degustazione/') { $content = file_get_contents('.//menu-degustazione//old_index.html.html'); } 
if ($url == 'http://locandaorta.com/menu-degustazione/') { $content = file_get_contents('.//menu-degustazione//old_index.html.html'); } 
if ($url == 'http://www.locandaorta.com/fabrizio-tesse-stella-michelin/') { $content = file_get_contents('.//fabrizio-tesse-stella-michelin//old_index.html.html'); } 
if ($url == 'http://locandaorta.com/fabrizio-tesse-stella-michelin/') { $content = file_get_contents('.//fabrizio-tesse-stella-michelin//old_index.html.html'); } 
if ($url == 'http://www.locandaorta.com/fabrizio-tesse-chef/') { $content = file_get_contents('.//fabrizio-tesse-chef//old_index.html.html'); } 
if ($url == 'http://locandaorta.com/fabrizio-tesse-chef/') { $content = file_get_contents('.//fabrizio-tesse-chef//old_index.html.html'); } 
if ($url == 'http://www.locandaorta.com/fabrizio-tesse-biografia/') { $content = file_get_contents('.//fabrizio-tesse-biografia//old_index.html.html'); } 
if ($url == 'http://locandaorta.com/fabrizio-tesse-biografia/') { $content = file_get_contents('.//fabrizio-tesse-biografia//old_index.html.html'); } 
if ($url == 'http://www.locandaorta.com/cucina-2/') { $content = file_get_contents('.//cucina-2//old_index.html.html'); } 
if ($url == 'http://locandaorta.com/cucina-2/') { $content = file_get_contents('.//cucina-2//old_index.html.html'); } 
if ($url == 'http://www.locandaorta.com/le-guide-e-i-riconoscimenti/') { $content = file_get_contents('.//le-guide-e-i-riconoscimenti//old_index.html.html'); } 
if ($url == 'http://locandaorta.com/le-guide-e-i-riconoscimenti/') { $content = file_get_contents('.//le-guide-e-i-riconoscimenti//old_index.html.html'); } 
if ($url == 'http://www.locandaorta.com/scopri-il-lago-dorta/') { $content = file_get_contents('.//scopri-il-lago-dorta//old_index.html.html'); } 
if ($url == 'http://locandaorta.com/scopri-il-lago-dorta/') { $content = file_get_contents('.//scopri-il-lago-dorta//old_index.html.html'); } 
if ($url == 'http://locandaorta.com/magazine/') { $content = file_get_contents('.//magazine//old_index.html.html'); } 
if ($url == 'http://www.locandaorta.com/magazine/') { $content = file_get_contents('.//magazine//old_index.html.html'); } 
if ($url == 'http://www.locandaorta.com/come-arrivare-alla-locanda-di-orta/') { $content = file_get_contents('.//come-arrivare-alla-locanda-di-orta//old_index.html.html'); } 
if ($url == 'http://locandaorta.com/come-arrivare-alla-locanda-di-orta/') { $content = file_get_contents('.//come-arrivare-alla-locanda-di-orta//old_index.html.html'); } 
if ($url == 'http://locandaorta.com/guestbook') { $content = file_get_contents('.//guestbook/guestbook.html'); } 
if ($url == 'http://www.locandaorta.com/guestbook') { $content = file_get_contents('.//guestbook/guestbook.html'); } 
if ($url == 'http://www.locandaorta.com/en/classic-rooms-locanda/') { $content = file_get_contents('.//en/classic-rooms-locanda//old_index.html.html'); } 
if ($url == 'http://locandaorta.com/en/classic-rooms-locanda/') { $content = file_get_contents('.//en/classic-rooms-locanda//old_index.html.html'); } 
if ($url == 'http://www.locandaorta.com/en/contacts/') { $content = file_get_contents('.//en/contacts//old_index.html.html'); } 
if ($url == 'http://locandaorta.com/en/contacts/') { $content = file_get_contents('.//en/contacts//old_index.html.html'); } 
if ($url == 'http://www.locandaorta.com/?p=1046') { $content = file_get_contents('.///?p=1046.html'); } 
if ($url == 'http://locandaorta.com/?p=1046') { $content = file_get_contents('.///?p=1046.html'); } 
if ($url == 'http://www.locandaorta.com/en/tradition-rooms-locanda/') { $content = file_get_contents('.//en/tradition-rooms-locanda//old_index.html.html'); } 
if ($url == 'http://locandaorta.com/en/tradition-rooms-locanda/') { $content = file_get_contents('.//en/tradition-rooms-locanda//old_index.html.html'); } 
if ($url == 'http://www.locandaorta.com/?p=1042') { $content = file_get_contents('.///?p=1042.html'); } 
if ($url == 'http://locandaorta.com/?p=1042') { $content = file_get_contents('.///?p=1042.html'); } 

if (empty($content)){
   $pathinfo = $_SERVER['PATH_INFO'];
   $_arr = explode('.',$pathinfo);
   $type = $_arr[count($_arr)-1];
   switch($type) {
      case 'css':
          $header = "text/css";
          break;
      case 'js':
          $header = "text/plain";
          break;
      case 'jpg':
          $header = "image/jpeg";
          break;
      case 'png':
          $header = "image/png";
          break;
      case 'jpeg':
          $header = "image/jpeg";
          break;
      case 'gif':
          $header = "image/gif";
          break;
      case 'tiff':
          $header = "image/tiff";
          break;
      default:
          $header = "text/html";
   }
   $path = $_SERVER["REQUEST_URI"];
   $content = file_get_contents("./".$path);
   header("Content-type: " . $header);
}
if ($content !== false) {echo $content;exit;}
