diff --git a/services/src/main/java/org/keycloak/services/resources/admin/AdminConsole.java b/services/src/main/java/org/keycloak/services/resources/admin/AdminConsole.java index bd897fa340..38bd390e77 100755 --- a/services/src/main/java/org/keycloak/services/resources/admin/AdminConsole.java +++ b/services/src/main/java/org/keycloak/services/resources/admin/AdminConsole.java @@ -250,9 +250,11 @@ public class AdminConsole { @GET public Response getMainPage() throws URISyntaxException { - return Response.status(302).location( - AdminRoot.adminConsoleUrl(uriInfo).path("index.html").build(realm.getName()) - ).build(); + if (!uriInfo.getRequestUri().getPath().endsWith("/")) { + return Response.status(302).location(uriInfo.getRequestUriBuilder().path("/").build()).build(); + } else { + return getResource("index.html"); + } } @GET