header php redirect
snippet in php

php redirect

user4571

//PHP redirect
header("Location: https://www.codegrepper.com/my-redirect-page.php");
die();

php header location

user3481

<?php
// This will just redirect you to example.com
header("Location: https://example.com");  
?>

redirect php

user6403

< ?php header("Location: http://www.redirect.to.url.com/"); ?>

php redirect

user1948

header("Location: http://example.com");
die();

header location php

user1240

<?php
// This will just redirect you to example.com
$url = "https://example.com";
header("Location: $url");  
?>

header php redirect

user7803

<?php
  header('Location: http://www.aaaa/index.php');
  exit();		// useless to let script running
?>

<?php
  // permanent redirection (default is 302, 303 for most robots)
  header('Location: http://www.aaaa/index.php', true, 301);
  exit();		// useless to let script running
?>

// or a meta in html header (if html generation is initiated) 
<head>
	<meta http-equiv="Location" content="http://www.aaaa/index.php">
</head>
// or waits 15s before redirection
<head>
  	<meta http-equiv="refresh" content="15;URL=http://www.aaaa/index.php">
</head>

// or via javascript
<script>
	window.location.replace('http://www.aaaa/index.php');
</script>