Forum Moderators: coopster
i am using
<IfModule mod_php4.c>
php_value session.use_trans_sid 0
</IfModule>
in my .htacess file to supress the PHPSESSID=22y3213etc. but it means that if a cookie isn't set the site fails to work properly.
if i remove that from my .htaccess the site works fine because the PHPSESSID is passed around evey page, but it knackers things for SEO purposes.
Is there a way i can do:
if (isset(cookie))
{
supress PHPSESSID;
}
else
{
dont supress PHPSESSID;
}
any help would be much appreciated!
damn seo always throws a spanner in the works ;-)
Cheers,
hughie
if (user agent is NOT on my list of search engines)
{
DO start a session;
}
else if user agent is on my list
{
do NOT start a session
}
Then you don't have to worry. If the user has cookies enabled, the session won't be in the URL by default.
The only bad thing about using sesisons in URLs for human users is that if people without cookies bookmark a page, the url will be invalid once the session expires. Make sure that if the session is invalid, the user goes to someplace logical (ideally, the intended page, but with a new session ID generated).