Why downcase everything? URL are case sensitive. Only domains are insensitive AFAIK.