<?php
// Open redirect — accepts any url/to/dest/next param.
$target = $_GET['url'] ?? $_GET['to'] ?? $_GET['dest'] ?? $_GET['next'] ?? '/';
header("Location: $target", true, 302);
echo "redirecting to $target";
