I have a problem with my current web application. Indeed, when I put the current link : https://localhost:44311/#shop, my page displayed perfectly. Here a picture :

But then when I try to change my URL to : https://localhost:44311/#/ , to verify the control of the redirection, the content displayed into the same content, here a picture of what happened :

Currently, all my ajax calls are called again and again and again (an infinite loop).
I'm trying to add control regex for #/, and try to respect #/xxxx/xxxxx. But without success. If you can help me, it could be very nice ! Here my JS where I manage the loadpages :
var ui = {
controller: {
page: {}
},
component: {
category: null
}
};
ui.controller.pageLoad = function (hash = null) {
if (hash === null) {
hash = window.location.hash;
if (hash.length < 2 || hash[0] !== "#") {
hash = "/shop";
}
} else if (hash.length < 2 || hash[0] === "#" && hash[1] === '/') { // add control regex for #/, must respect #/xxxx/xxxxx
hash = "/shop";
}
$.get(hash.substring(1), function (data) {
ui.controller.page = null;
$("#content").html(data);
}).fail(function (error) {
$.get("/Home/Error?status=" + error.status, function (data) {
ui.controller.page = null;
$("#content").html(data);
});
});
};