format URLs properly