Redirigir el usuario cuando desee acceder a la página HTML

add a script in the very top of your page to check for example if the user is logged In : 
//////////////////////////////////////////
<script>
  if (window.sessionStorage.getItem("data") == null) {
    window.location.replace(
      "http://localhost/hospital/front-end/public/index.html"
    );
  }
</script>
///////////////////////////////////////////
Healthy Hawk