skipunda Posted April 17, 2009 Posted April 17, 2009 Hi, Just a quick one, can anyone help me understand these few lines.. if ((!isset($_GET["cPath"]) or $_GET["cPath"]=="") && (!isset($_GET["keywords"]))) { header("Location: home page "); } (I've put in home page) thanks
noperdienope Posted April 17, 2009 Posted April 17, 2009 If the get cPath is not found, or if its equal to "", AND if the keywords get is not set, then write an HTML header wich redirects to the homepage.
skipunda Posted April 17, 2009 Author Posted April 17, 2009 If the get cPath is not found, or if its equal to "", AND if the keywords get is not set, then write an HTML header wich redirects to the homepage. Ok, got that. Thanks By removing this code completely and by typing a bad URL the cPath will not be told to redirect to homepage so it gives a blank page as apposed to a 404 error. I have a google analytics tracking variable on the end you see called ?gclid=[alphanumeric characters]. With this current code (above) it wont be able to find the variable in database and send the user to the homepage instead. With the code above commented out it will produce a page with the variable attached but no products because it's counting the Variable also. I think another question is in order :rolleyes: being 'How do I get cPath to ignore this variable?', which I'll post up
Recommended Posts
Archived
This topic is now archived and is closed to further replies.