[Resource] Improved redirect to referer