Forum Moderators: phranque

Message Too Old, No Replies

session ids in url

will this help?

         

welshy

1:47 am on Feb 24, 2005 (gmt 0)

10+ Year Member



Hi,

First off I have used the search and found many posts on this subject, but posts to old to reply :(

I read in a post in regards to session ids that if you use this coed: (pasting below)

<?
/* Use this to start a session only if the UA is *not* at search engine to avoid duplicate content issues with url propagation of SID's */
$searchengines=array("Google", "Fast", "Slurp", "Ink", "ia_archiver", "Atomz", "Scooter"); $is_search_engine=0; foreach($searchengines as $key => $val) { if(strstr("$HTTP_USER_AGENT", $val)) { $is_search_engine++; } } if($is_search_engine==0) { // Not a search engine /* You can put anything in here that needs to be hidden from searchengines */ session_start(); } else { // Is a search engine /* Put anything you want only for searchengines in here */ $foo=$bar; }?>

Is that something that people use to hide SessionID from url to help searchengines crawl there site?

If that is the code, does it go in your .htaccess file?

If I'm on the wrong track here could someone explain please.

Thanks

Welshy

welshy

4:49 pm on Feb 24, 2005 (gmt 0)

10+ Year Member



Ok after doing more searching I found out one way of doing it and seems to be working.

editing your .htaccess file and include the following:
CODE
php_flag session.use_trans_sid off
php_flag session.use_only_cookies On

Is this what most people do?