Ling Duan
0
Q:

how to redirect with php

//PHP redirect
header("Location: https://www.codegrepper.com/my-redirect-page.php");
die();
15
< ?php header("Location: http://www.redirect.to.url.com/"); ?>
2
header("Location: http://example.com/myOtherPage.php");
die();
4
header("Location: http://example.com/redirect_page.php");
die(); //Force the script to quit, or you would raise an error...
2
header("Location: http://example.com");
die();
1
header("Location: /");
exit();
1
<?php
  header("Location: (redirect url)");
?>
1
//Write this in the Controller when working on Laravel.

header('Location: http://www.example.com/');
exit;
1

New to Communities?

Join the community