Iam using below line in my script tag, here is that line:
var url = "<?php echo $_SERVER['PHP_SELF']; ?>";
The above line working fine and its redirecting to http://mysite.com , but I want it to redirect to http://mysite.com/shop/c/mycategoryname
where mycatgeoryname should be whatever the category-name it was in url, that I shud get..
can anyone pls..?
You are looking for
$_SERVER['PATH_INFO']This will return an array with all the information related to the path. You should be able to see what is returned by doing
print_r($_SERVER['PATH_INFO']);Hope this helps.