Show button in a site only if the page has a specific href

I try to show a button on a page, only if that page has a specific href.
Unfortunately, the code that i am using will show the button on all pages of the site instead of just /search/

<?php if (pathname == "https://www.example.com/search/") {?> <div class="spotlight"><h1><button type="button">Click Me!</button></h1></div><? } ?>

Can someone tell what i am doing wrong here?

Any php or jquery solution would be welcomed.