Is there a way to replace the javascript url without rebooting? for instance
www.url.com/index.php/presenter/view/../
to
www.url.com/presenter/view/../
? I tried it with the history.replaceState function, but it only changes the URL after index.php..
function parseUrl(){
currUrl = window.location.href;
verify = currUrl.indexOf("index.php");
if(verify != -1){
newUrl = currUrl.substring(0,verify-1);
newUrl += '#'+currUrl.substring(currUrl.indexOf('index.php')+10,currUrl.length);
if(window.history.replaceState){
window.history.replaceState(null, this.title, newUrl);
}
else{
window.location.href = newUrl;
}
}
}
source
share