On the homepage, I’m trying to match the url in the browser with site url and I can’t use $page->isHomePage
$currentUrl = parse_url((isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on' ? "https" : "http") . "://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]");
$siteUrl = parse_url($site->url()); ?>
but no matter what, when I compare the two, it still comes back false despite being the exact same url and both being a string.
if($currentUrl == $siteUrl): ?>
true
<?php else: ?>
false
<?php endif ?>
What am I missing?