Correct Redirect To Location

This is a PHP snippet, talking about url, redirect and link

Correct Redirect To Location Add to Favorite

function redirect($url='./', $permanent=false)
{
	if($permanent)
	{
		header('HTTP/1.1 301 Moved Permanently');
		header('Status: 301 Moved Permanently');
		header('Retry-After: 120');
		header('Location: '.$url, true, 301);
		header('Connection: Close');
	}
	else
	{
		header('Location: '.$url);
	}
	exit('If your browser does not support automatic redirect, <a href="'.$url.'" title="proceed">click here.</a>');
}

Created by ThePeppersStudio (358 days, 4.68 hours ago)

Do you want to leave a message? Please login first.