enter code here
This JavaScript snippet removes the /#/and/everything/after
from URL, and reloads the page.
var loc = window.location.href,
index = loc.indexOf('#');
if (index > 0) {
window.location = loc.substring(0, index);
}
As a result, something like this:
http://www.somesite.com/#/somepage
reloads as this:
http://www.somesite.com
How can I modify the snippet, to make it remove only this part: #/
, but keeo everything that comes after it, and load the page at the url that has everything before and after #/
, like this:
http://www.somesite.com/somepage