[url]http://sturents.com
On the front page the user selects a location with a link in the form:
[url]http://sturents.com/location
This is mod_rewritten to load index.php which grabs this location from the URI to get the search page setup for that location. Other links on the site go to more generic pages (such as /about and /news) and so I didn’t want to have to preserve the location URL because it would be lying to search engines.
So that a user can go back to the search page without selecting a location again I’m trying to store the location value in a cookie. When the /location page is accessed it sets a cookie:
[code=php]setcookie(“loc”,$site[‘loc’][‘title’],time()+3600,’/’);
On future page loads if no location is present in the URI it checks to see if this cookie is there. However on any page that doesn’t specifically set the cookie the cookie is not there – calling print_r($_COOKIES) gives an array of all the cookies on the site (such as username and password) but not the location cookie. There is no line of code in the whole site that specifically unsets the cookie so my only thought is that its a problem with the fact that the site thinks its in a sub-directory when it writes the cookie.
Any thoughts?