Welcome Guest ( Log In | Register )



 
Reply to this topicStart new topic
> Need Help - How To Remove Session ID From URL
sid.calcutta
post Apr 1 2006, 09:15 PM
Post #1


Advanced Member
******

Group: Validating
Posts: 111
Joined: 28-January 06
Member No.: 10,917



Oflate I was going through Google information for webmasters and I noticed the following technical guideline for the webmasters:
QUOTE
Allow search bots to crawl your sites without session IDs or arguments that track their path through the site. These techniques are useful for tracking individual user behavior, but the access pattern of bots is entirely different. Using these techniques may result in incomplete indexing of your site, as bots may not be able to eliminate URLs that look different but actually point to the same page.

It clearly shows that undesired session IDs may have adverse effect at least for two reasons :
1)Duplicating content!
and 2) crawlers may enter into an infinte loop and access the same page repeatedly as it may not be able to eliminate URLs that look different but actually point to the same page.
However, I could not find any suitable method either for allowing the bots to crawl my site without session IDs or to remove the undesired session IDs from the url.
I searched for a solution and got this one:
CODE

         ini_set( 'session.use_cookies', ( int )1 );
         ini_set( 'session.use_trans_sid', ( int )1 );
         session_start();
        


But it did not work for me.
Now is there any other way to remove undesired session IDs from the URL? or am I making some mistake in handling sessions.
Thanks in anticipation of some good advice.
Regards,
Sid

Go to the top of the page
 
+Quote Post
Hercco
post Apr 2 2006, 12:13 PM
Post #2


Super Member
Group Icon

Group: Members
Posts: 595
Joined: 4-September 04
Member No.: 228



You can turn the session ID transmission from URI off using a .htaccess file and php flags. I've done this as I feel it's lot handier than adding the lines to every page header.

Just in .htaccess file put the following lines:


CODE

php_flag session.use_trans_sid off
php_flag register_globals off



Although the code you specified should in my opinion work. Well, try the htaccess method and if it doesn't work let's figure out something else.

This post has been edited by Hercco: Apr 2 2006, 12:14 PM
Go to the top of the page
 
+Quote Post
Quatrux
post Apr 2 2006, 08:56 PM
Post #3


the Q
Group Icon

Group: [HOSTED]
Posts: 1,133
Joined: 13-July 05
From: Lithuania, Vilnius
Member No.: 7,059
myCENTs:5.70



Just make your scripts that they would not do that, I never had problems with this kind of things, but I don't know what url's you're using, I always use GET or PATH_INFO or QUERY_STRING and use sessions. Those PHPSESSID is annoying for me, I usually change the name for the session and work with that cookie. wink.gif
Go to the top of the page
 
+Quote Post
sid.calcutta
post Apr 25 2006, 07:07 PM
Post #4


Advanced Member
******

Group: Validating
Posts: 111
Joined: 28-January 06
Member No.: 10,917



QUOTE(Quatrux @ Apr 3 2006, 03:26 AM) *

....I always use GET or PATH_INFO or QUERY_STRING and use sessions....)

Thanks Quatrux, your suggestions helped me a lot. Now that PHPSESSID is no more there.
Also I think, putting "php_flag register_globals off" in .htacces file, would turn the global variables off. As I have used global variables, so it was just not ideal for me to do like that. Still thanks to you Hercco for your suggestion.
Regards,
Sid
Go to the top of the page
 
+Quote Post
wojta
post Jun 1 2006, 03:59 PM
Post #5


Newbie [ Level 2 ]
Group Icon

Group: Members
Posts: 23
Joined: 18-April 06
Member No.: 12,839



QUOTE(sid.calcutta @ Apr 1 2006, 10:15 PM) *

Oflate I was going through Google information for webmasters and I noticed the following technical guideline for the webmasters:

It clearly shows that undesired session IDs may have adverse effect at least for two reasons :
1)Duplicating content!
and 2) crawlers may enter into an infinte loop and access the same page repeatedly as it may not be able to eliminate URLs that look different but actually point to the same page.
However, I could not find any suitable method either for allowing the bots to crawl my site without session IDs or to remove the undesired session IDs from the url.
I searched for a solution and got this one:
CODE

         ini_set( 'session.use_cookies', ( int )1 );
         ini_set( 'session.use_trans_sid', ( int )1 );
         session_start();
        


But it did not work for me.
Now is there any other way to remove undesired session IDs from the URL? or am I making some mistake in handling sessions.
Thanks in anticipation of some good advice.
Regards,
Sid


Perhaps session.use_trans_sid is the ticket you're looking for...

Wojta
Go to the top of the page
 
+Quote Post
vhortex
post Jun 2 2006, 12:31 PM
Post #6


Guilty Until Proven Innocent
Group Icon

Group: Members
Posts: 372
Joined: 13-April 05
Member No.: 3,937



QUOTE(sid.calcutta @ Apr 26 2006, 03:07 AM) *

Thanks Quatrux, your suggestions helped me a lot. Now that PHPSESSID is no more there.
Also I think, putting "php_flag register_globals off" in .htacces file, would turn the global variables off. As I have used global variables, so it was just not ideal for me to do like that. Still thanks to you Hercco for your suggestion.
Regards,
Sid


well, on my opinion only.. it is best to turn off register globals to your site..
but you need to convert all those variable callin to his types

$_POST
$_GET
$_SESSION

on my own experience, register globals on can provide lots of problems
which is to many to mention all here..
Go to the top of the page
 
+Quote Post
iGuest
post Jul 23 2008, 02:30 PM
Post #7


Newbie [ Level 1 ]
Group Icon

Group: Members
Posts: 0
Joined: 1-November 07
Member No.: 25,869



Are there platforms in which removing session ID\\
Need Help - How To Remove Session ID From URL

I have been trying to find a way to mask session ID's from our site (http://www.Hrdirect.Com) because they are killing our SEO. I'm being told that doing so is "Not possible in our platform" Is this possible?

-reply by Lindsay
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic

Collapse

> Similar Topics

Topics Topics
  1. Php, Sql Lite: Storing Session's Data?(1)
  2. Session And Security(0)
  3. User Authentication Session Handling Problems(14)
  4. How To Delete Files When Session Ends(4)
  5. Help: Removing A Specific Header With cURL(0)
  6. How To Remove Query String Using Regular Expressions(4)
  7. Already Sent Session Cookies?(2)
  8. Php Session Problem(7)
  9. Run A Script When Expires A Session(6)


 



- Lo-Fi Version Time is now: 5th December 2008 - 01:37 AM