Changed PHP_SELF to REQUEST_URI, since the last one does work on nginx, and the first one does not.