SyntaxFix
Write A Post
Hire A Developer
Questions
maybe
var re = /^https?:\/\/[^/]+/i; window.location.href = re.exec(window.location.href)[0];
is what you're looking for?