<script>
// Get the 'to' parameter from the URL
const urlParams = new URLSearchParams(window.location.search);
const targetUrl = urlParams.get('to');
if (targetUrl) {
// Decode the URL and redirect
window.location.href = decodeURIComponent(targetUrl);
} else {
// Optional: redirect to homepage if no URL is provided
window.location.href = '/';
}
</script>