Fix for assumption $_SERVER['REQUEST_URI'] is always set.