title: Redirect base url to homepage
body: <p>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.</p>
  
  <p>I'm using jquery and so far I have this:</p>
  
  <pre><code>    if (location.host) {
      location.replace((location.host) + '/home');
      }
  </code></pre>
  
  <p>But is not working... I am new to js and I need help.</p>