safe redirect function for php code example Example: php redirect to page header("Location: /"); exit();