When redirect to my home page I have an infinite loop. For example is http://mydomain.com then when redirect using javascript
url = ‘home/request_verification’ ;
window.location = url;
my url now becomes http://mydomain.com/home/request_verfication then http://mydomain.com/home/home/request_verification and so on. It always added home class.
I just used this script
function checkCookie() {
var mob_tel=getCookie("mob_tel");
if (mob_tel!=null && mob_tel!="") {
//alert("Welcome again " + mob_tel);
url = "home/test";
window.location = url;
//window.location.href('home/checkbalance');
} else {
set_name("");
}
}
then in my body
<body onload="checkCookie()">
...........
................
</body>
Help anyone..
home/testis a relative url. You’re probably in need of an absolute url/home/test.The difference is that
home/looks forhomein the current folder, but/homelooks forhomein the root of your website.