Answers for "php redirect to page"

PHP
28

php redirect

//PHP redirect
header("Location: https://www.codegrepper.com/my-redirect-page.php");
die();
Posted by: Guest on August-06-2019
2

header php redirect

<?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>
Posted by: Guest on January-23-2021
3

redirect php

< ?php header("Location: http://www.redirect.to.url.com/"); ?>
Posted by: Guest on September-16-2020
1

php redirect to another page

header("Location: pagetoredirectfor.php");
exit();
Posted by: Guest on June-14-2021
3

php redirect

header("Location: http://example.com");
die();
Posted by: Guest on October-03-2020
1

php redirect to page

header("Location: /");
exit();
Posted by: Guest on May-16-2020

Browse Popular Code Answers by Language