Proper fallback from referer to REQUEST_URI