namespace_from_url: Changed documentation.
Only 'www' as the last item should be removed.
Also watch for a trailing dot in the hostname. It's technically valid and will give you a blank string as the first item in the list.