<?php
#// router.php
#if (preg_match('/\.(?:png|jpg|jpeg|gif)$/', $_SERVER["REQUEST_URI"])) {
#    return false;    // serve the requested resource as-is.
#} else { 

if(startsWith($_SERVER["REQUEST_URI"],"/karen/")){
  return false;
} else {
echo "<p>Welcome to PHP</p>";
echo  $_SERVER["REQUEST_URI"];
  }
#}


function startsWith($haystack, $needle)
{
  $length = strlen($needle);
  return (substr($haystack, 0, $length) === $needle);
}

function endsWith($haystack, $needle)
{
  $length = strlen($needle);

    return $length === 0 || 
      (substr($haystack, -$length) === $needle);
}
?>