Hello,
I have a problem: I want to redirect via JavaScript to a directory above. My code:
window.location.href = (location.href).substr(0, (location.href).lastIndexOf('folder'));
The url looks like this:
domain.com/path/folder/index.php?file=abc&test=123&lol=cool
The redirect affect just this:
domain.com/path/&test=123&lol=cool
But want to have this:
domain.com/path/
How could I do that?