1//PHP redirect
2header("Location: https://www.codegrepper.com/my-redirect-page.php");
3die();
4
1<?php
2// This will just redirect you to example.com
3header("Location: https://example.com");
4?>
1//PHP redirect
2header("Location: https://www.codegrepper.com/my-redirect-page.php");
3die();
1function Redirect($url, $permanent = false)
2{
3 header('Location: ' . $url, true, $permanent ? 301 : 302);
4
5 exit();
6}
7
8Redirect('http://example.com/', false);