Skip to content

Commit

Permalink
Adding a redirect http utility function
Browse files Browse the repository at this point in the history
  • Loading branch information
Fabrice Luraine committed Jun 3, 2009
1 parent cb5748c commit ed3262a
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions lib/limonade.php
Expand Up @@ -1551,6 +1551,18 @@ function status($code = 500)
header($str);
}

/**
* Http redirection
*
* @param string $url
* @return void
*/
function redirect($url)
{
status(HTTP_MOVED_PERMANENTLY);
header('Location: '.$url);
}

/**
* Returns HTTP response status for a given code.
* If no code provided, return an array of all status
Expand Down

0 comments on commit ed3262a

Please sign in to comment.