diff --git a/dhis-2/dhis-web-api/src/main/resources/org/hisp/dhis/webapi/servlet/login.html b/dhis-2/dhis-web-api/src/main/resources/org/hisp/dhis/webapi/servlet/login.html
index 27ed51bea4b..a9775e915ed 100644
--- a/dhis-2/dhis-web-api/src/main/resources/org/hisp/dhis/webapi/servlet/login.html
+++ b/dhis-2/dhis-web-api/src/main/resources/org/hisp/dhis/webapi/servlet/login.html
@@ -250,7 +250,7 @@
@@ -351,7 +351,7 @@
Log in
config.applicationDescription || "Welcome to the DHIS2 application";
if (config.countryFlag) {
const flag = document.getElementById("flag");
- flag.src = `/dhis-web-commons/flags/${config.countryFlag}.png`;
+ flag.src = `./dhis-web-commons/flags/${config.countryFlag}.png`;
flag.style.display = "block";
}
} catch (error) {
@@ -425,7 +425,7 @@ Log in
const user = await response.json();
if (user.loginStatus === "SUCCESS") {
- const redirectUrl = user.redirectUrl || "/";
+ const redirectUrl = user.redirectUrl || "./";
window.location.href = redirectUrl;
} else {
throw new Error("Login failed. Status: " + user.loginStatus);