title: Javascript not properly redirecting
body: <p>I am working in <strong>PHP Codeigniter.</strong>
  My page's <strong>current URL</strong> is =>  <code>http://localhost.hbs.com/hbs/merchant/login</code>
  On an event i want to redirect my page to => <code>http://localhost.hbs.com/hbs/category</code>
  I am trying <strong>following code</strong>,</p>
  
  <pre><code>window.location = '&lt;?php echo json_encode(base_url("category"));?&gt;';
  </code></pre>
  
  <p><strong>also tried</strong> </p>
  
  <pre><code>=&gt;window.location.href , top.location
  </code></pre>
  
  <p>But it redirects me to,</p>
  
  <pre><code>http://localhost.hbs.com/hbs/merchant/"http://localhost.hbs.com/hbs/category"
  </code></pre>
  
  <p>I've <strong>also tried for debugging</strong> this code,
  window.location = "google.com"
  but it redirects me to => <code>http://localhost.hbs.com/hbs/merchant/google.com</code></p>