How to change the path name property in Location object in Javascript
pathname property
The pathname
property can be set
with new values that alter the current URL.
Example
<!DOCTYPE HTML>
<html>
<body>
<script>
location.pathname = "mydir";
</script>
</body>
</html><!--from w w w . j a v a 2 s. co m-->