Jump to content
xisto Community
Sign in to follow this  
iGuest

Need Help - How To Remove Session ID From URL

Recommended Posts

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

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:

		 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

Share this post


Link to post
Share on other sites

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:


php_flag session.use_trans_sid offphp_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.
Edited by Hercco (see edit history)

Share this post


Link to post
Share on other sites

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. :lol:

Share this post


Link to post
Share on other sites

....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

Share this post


Link to post
Share on other sites

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:

		 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

Share this post


Link to post
Share on other sites

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..

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.