By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,718 Members | 1,438 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,718 IT Pros & Developers. It's quick & easy.

Session Info Added to URL

P: n/a
I'm noticing that when my homepage first starts up, all the menu links
to other pages have the session info appended to the URL. For example:

href="products/product_list.php?PHPSESSID=45759f8aadee64cff2db657 48977ac67"

This is done automatically as the original URL that I coded does not
have the session information added to it.

My first question is, is this normal behavior? The reason I'm
concerned is I have been tracking the Google Bot's activity on our
site and it hits the homepage and does not crawl the other pages. I'm
concerned the added session info is throwing it off.

Should I be concerned and if so, is there a way of preventing it from
appending the session info? I don't have the option of removing the
session_start() from the page because I must test for a session
variable.

Any help on this would be greatly appreciated...

Paul
Jul 17 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
I noticed that Message-ID:
<8b************************@posting.google.com> from Celebrate contained
the following:
Should I be concerned and if so, is there a way of preventing it from
appending the session info? I don't have the option of removing the
session_start() from the page because I must test for a session
variable.

The way I understand this is that there are two ways of passing the
session info. One is by setting a cookie and the other is by storing
the session variables on the server and then accessing them via a
session id.

Your security settings are probably preventing cookies being set, hence
the addition of the ID (someone please correct me if I've got this
wrong)
--
Geoff Berrow
It's only Usenet, no one dies.
My opinions, not the committee's, mine.
Simple RFDs http://www.ckdog.co.uk/rfdmaker/
Jul 17 '05 #2

P: n/a
Celebrate wrote:
I'm noticing that when my homepage first starts up, all the menu links
to other pages have the session info appended to the URL. For example:

href="products/product_list.php?PHPSESSID=45759f8aadee64cff2db657 48977ac67"

This is done automatically as the original URL that I coded does not
have the session information added to it.

My first question is, is this normal behavior? The reason I'm
concerned is I have been tracking the Google Bot's activity on our
site and it hits the homepage and does not crawl the other pages. I'm
concerned the added session info is throwing it off.

Yes, it's normal. The first time the session is started, PHP doesn't
know if you support cookies or not. So it sends you a session cookie and
it also rewrites the URL. The second time, PHP receives the cookie, and
thus stops rewriting URLs.
The solution for google is to start the session only when it's
necessary. I think it's also possible to change php.ini in order to only
use cookies for sessions. But if you do that, all the visitors who
deactivate cookies won't be able to use your web site.

JB.
Should I be concerned and if so, is there a way of preventing it from
appending the session info? I don't have the option of removing the
session_start() from the page because I must test for a session
variable.

Any help on this would be greatly appreciated...

Paul


Jul 17 '05 #3

P: n/a
pl****@celebrate-software.com (Celebrate) wrote in message news:<8b************************@posting.google.co m>...
I'm noticing that when my homepage first starts up, all the menu links
to other pages have the session info appended to the URL. For example:

href="products/product_list.php?PHPSESSID=45759f8aadee64cff2db657 48977ac67"

This is done automatically as the original URL that I coded does not
have the session information added to it.

My first question is, is this normal behavior? The reason I'm
concerned is I have been tracking the Google Bot's activity on our
site and it hits the homepage and does not crawl the other pages. I'm
concerned the added session info is throwing it off.
It's because in you PHP.ini file, you have session.use_trans_sid
= 1. See http://cvs.php.net/co.php/php-src/php.ini-dist

Should I be concerned


Not much except for security reasons. Look at your ini file's
session section for more stuff.

---
"US got a nuclear bomb that can destroy the world 13 times. Russia
got a nuclear bomb that can destroy the world 7 times. But...my
friend! Tell me! CAN YOU KILL A MAN TWICE??!!!!!" -- P.A.Sangma, Peace
loving Indian politician against India's step to go for a nuclear
test.
Email: rrjanbiah-at-Y!com
Jul 17 '05 #4

P: n/a
ng**********@rediffmail.com (R. Rajesh Jeba Anbiah) wrote in message news:<ab**************************@posting.google. com>...
pl****@celebrate-software.com (Celebrate) wrote in message news:<8b************************@posting.google.co m>...
I'm noticing that when my homepage first starts up, all the menu links
to other pages have the session info appended to the URL. For example:

href="products/product_list.php?PHPSESSID=45759f8aadee64cff2db657 48977ac67"

This is done automatically as the original URL that I coded does not
have the session information added to it.

My first question is, is this normal behavior? The reason I'm
concerned is I have been tracking the Google Bot's activity on our
site and it hits the homepage and does not crawl the other pages. I'm
concerned the added session info is throwing it off.


It's because in you PHP.ini file, you have session.use_trans_sid
= 1. See http://cvs.php.net/co.php/php-src/php.ini-dist

Should I be concerned


Not much except for security reasons. Look at your ini file's
session section for more stuff.

---
"US got a nuclear bomb that can destroy the world 13 times. Russia
got a nuclear bomb that can destroy the world 7 times. But...my
friend! Tell me! CAN YOU KILL A MAN TWICE??!!!!!" -- P.A.Sangma, Peace
loving Indian politician against India's step to go for a nuclear
test.
Email: rrjanbiah-at-Y!com


Thanks for the help guys.

Paul
Jul 17 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.