Restructure no-ssl/ssl; improve canonicalisation