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