From the warning message, it's clear that you need to put REQUEST_URI inside the quote ('') to get rid of the warning message. If you don't put REQUEST_URI inside the quote, your code will throw an error in the future.
Make the following change in your code, and the warning message will be gone.
From
if ($_SERVER[REQUEST_URI] === '/'){
to
if ($_SERVER['REQUEST_URI'] === '/'){