Better handling of file and www uri's