I need to find the base url and redirect it to the 'home' page. Also I need to use relative expressions so that I don't have to edit the js file and it could be used in diferent websites.
I'm using jquery and so far I have this:
if (location.host) {
location.replace((location.host) + '/home');
}
But is not working... I am new to js and I need help.