diff --git a/dotCMS/src/main/java/com/dotcms/vanityurl/business/VanityUrlAPIImpl.java b/dotCMS/src/main/java/com/dotcms/vanityurl/business/VanityUrlAPIImpl.java index 48c7f0f42a1b..a50934474ebe 100644 --- a/dotCMS/src/main/java/com/dotcms/vanityurl/business/VanityUrlAPIImpl.java +++ b/dotCMS/src/main/java/com/dotcms/vanityurl/business/VanityUrlAPIImpl.java @@ -377,7 +377,7 @@ public boolean handleVanityURLRedirects(final VanityUrlRequestWrapper request, f final String queryString = request.getQueryString(); final int responseCode = request.getResponseCode(); - final String newUrl = uri + (queryString != null ? StringPool.QUESTION + queryString : StringPool.BLANK); + final String newUrl = uri + (UtilMethods.isSet(queryString) ? StringPool.QUESTION + queryString : StringPool.BLANK); if (responseCode == 301 || responseCode == 302) { response.setStatus(responseCode);