Modified detectGroupFromContentType() to use follow_location configuration switch.