KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
My problem is that I want to redirect via JavaScript to a directory above. My code: location.href = (location.href).substr(0, (location.href).lastIndexOf('folder')) The URL looks like this: example.com/path/folder/index.php?file=abc&test=123&lol=cool The redirect affect just this: example.com/path/&test=123&lol=cool But want to have this: example.com/path/ How can I do it?
Tags (comma-separated)
Save Edits
Cancel