Answers for "redirect in php"

PHP
28

php redirect

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

php header location

<?php
// This will just redirect you to example.com
header("Location: https://example.com");  
?>
Posted by: Guest on April-13-2020
4

php header redirect

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

how to redirect with php

<?php
  header("Location: (redirect url)");
?>
Posted by: Guest on November-01-2020
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
1

redirect in php

header("location: THE LOCATION"); //"THE LOCATION", put in a URL or directory to redirect to. For example, header("location: https://google.com/"); or header("location: ../../images/dog/");
Posted by: Guest on January-15-2021

Browse Popular Code Answers by Language