title: header location(PHP) and query redirection or refresh page not working
body: <p>Using .htacess file I rewrite url. working fine
  Problem with session expire. I used ajax for checking session is expire or not. if expire redirect on login page.
      I used <code>&lt;?php header('location: login.php'); die; ?&gt;</code> 
      also try `</p>
  
  <pre><code>&lt;script&gt;function checkLohinOtherUser(){
         $.ajax({
                  type: "POST",
                  url: 'login/dbc.php',
                  data: '&amp;do=checkLogin',
                  success: function(rep){ 
                   var result = eval("("+rep+")");   
                   if(result == 1){  
                      setTimeout(function() {
                          $('#pals_Schedule').hide();
                          $('#login-frame').html().show();
                           //window.location = "login/login.php";
                           window.location.href = 'login/login.php'; 
                   }, 1000); 
                   }
                  }
              });
      }
  
      setInterval(function(){ checkLohinOtherUser(); //alert("Hello"); 
      }, 5000);
      &lt;/script&gt;`
  </code></pre>