yo ocupo una función usable por php y escrita en javascript 

<?php 
function redir($wait, $dir){
?>
<script language="javascript">
setTimeout("location.href='<?php echo $dir; ?>'", <?php echo $wait; ?>);
</script>
<?php 
}
?>
y para usarla seria algo asi: redir(2000, 'index.php'); 
 
 PD La funcion escribela antes del body 
