Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

how to remove session id?


di_stephano20

Recommended Posts

Posted

hello i am usin SEO URL FINAL release and i am very satisfied with it.... BUT... there is allways a but... the problem is that at the end of every link i get some long string, wich i belive to be the session id...

 

exemple: .../compaq-dx5150-amd64-3500-p-2239.html?osCsid=82796eb4cab3eab98cec7bc1d5619e8b

instead of ../compaq-dx5150-amd64-3500-p-2239.html

 

i checked the settings in the SEO admin panel and they are ok... i tried to make some changes there but still no result.

 

i think that the power to remove that string lies in the .htaccess file. so here is the content of it..:

 

Options +FollowSymLinks

RewriteEngine On

RewriteBase /

 

RewriteRule ^(.*)-p-(.*).html$ product_info.php?products_id=$2&%{QUERY_STRING}

RewriteRule ^(.*)-c-(.*).html$ index.php?cPath=$2&%{QUERY_STRING}

RewriteRule ^(.*)-m-([0-9]+).html$ index.php?manufacturers_id=$2&%{QUERY_STRING}

RewriteRule ^(.*)-pi-([0-9]+).html$ popup_image.php?pID=$2&%{QUERY_STRING}

RewriteRule ^(.*)-t-([0-9]+).html$ articles.php?tPath=$2&%{QUERY_STRING}

RewriteRule ^(.*)-a-([0-9]+).html$ article_info.php?articles_id=$2&%{QUERY_STRING}

RewriteRule ^(.*)-pr-([0-9]+).html$ product_reviews.php?products_id=$2&%{QUERY_STRING}

RewriteRule ^(.*)-pri-([0-9]+).html$ product_reviews_info.php?products_id=$2&%{QUERY_STRING}

RewriteRule ^(.*)-i-([0-9]+).html$ information.php?info_id=$2&%{QUERY_STRING}

 

i don't know anything with mod_rewrite and stuff, so this is a big problem with me.. because what i do know is that a search engine will give up indexing my pages real fast with such long links...

 

so if u have any solutions for me.. i am looking forward..:) tnx....

:thumbsup:

Posted

the power to remove that lies in a correct setting of the cookie path I think.

if the session is stored in the cookie, it will no longer have to be stored in the url.

Posted

yes, post the top few lines of your config file, down to including all cookie settings

:-)

Monika

 

addicted to writing code ... can't get enough of databases either, LOL!

 

my toolbox: Textpad - Compare and Merge - phpMyAdmin - WS_FTP - Photoshop - How to search the forum

 

Interactive Media Award July 2007 ~ category E-Commerce

my advice on the forum is for free, PMs where you send me work are considered consultation which I charge for ...

Posted
yes, post the top few lines of your config file, down to including all cookie settings

 

Okay Monika, here is my config file from the includes directory... what am i supossed to modify here? because i have no ideea.. if u have any ideea... please tell me :)

<?php
/*
 $Id: configure.php,v 1.14 2003/07/09 01:15:48 hpdl Exp $

 osCommerce, Open Source E-Commerce Solutions
 http://www.oscommerce.com

 Copyright (c) 2003 osCommerce

 Released under the GNU General Public License
*/

// Define the webserver and path parameters
// * DIR_FS_* = Filesystem directories (local/physical)
// * DIR_WS_* = Webserver directories (virtual/URL)
define('HTTP_SERVER', 'http://www.angelosoft.ro');
define('HTTPS_SERVER', 'http://www.angelosoft.ro');
define('ENABLE_SSL', false); // secure webserver for checkout procedure?
define('HTTP_COOKIE_DOMAIN', 'http://www.angelosoft.ro');
define('HTTPS_COOKIE_DOMAIN', 'http://www.angelosoft.ro');
define('HTTP_COOKIE_PATH', '/');
define('HTTPS_COOKIE_PATH', '/');
define('DIR_WS_HTTP_CATALOG', '/');
define('DIR_WS_HTTPS_CATALOG', '/');
define('DIR_WS_IMAGES', '/images/');
define('DIR_WS_ICONS', '/icons/');
 define('DIR_WS_INCLUDES', 'includes/');
 define('DIR_WS_BOXES', DIR_WS_INCLUDES . 'boxes/');
 define('DIR_WS_FUNCTIONS', DIR_WS_INCLUDES . 'functions/');
 define('DIR_WS_CLASSES', DIR_WS_INCLUDES . 'classes/');
 define('DIR_WS_MODULES', DIR_WS_INCLUDES . 'modules/');
 define('DIR_WS_LANGUAGES', DIR_WS_INCLUDES . 'languages/');

 define('DIR_WS_DOWNLOAD_PUBLIC', 'pub/');
 define('DIR_FS_CATALOG', dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME']));
 define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/');
 define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/');

// define our database connection
define('DB_SERVER', 'localhost');
define('DB_SERVER_USERNAME', '#');
define('DB_SERVER_PASSWORD', '#');
define('DB_DATABASE', '#');
 define('USE_PCONNECT', 'false'); // use persistent connections?
define('STORE_SESSIONS', 'mysql');
?>

Posted

Hello

 

I have installed the following SEO version 2.1

 

http://www.oscommerce.com/community/contri...ch,SEO+by+chemo

 

on my clients websit and it didn't added the session id.

 

If possible try to use this.

 

 

 

 

hello i am usin SEO URL FINAL release and i am very satisfied with it.... BUT... there is allways a but... the problem is that at the end of every link i get some long string, wich i belive to be the session id...

 

exemple: .../compaq-dx5150-amd64-3500-p-2239.html?osCsid=82796eb4cab3eab98cec7bc1d5619e8b

instead of ../compaq-dx5150-amd64-3500-p-2239.html

 

i checked the settings in the SEO admin panel and they are ok... i tried to make some changes there but still no result.

 

i think that the power to remove that string lies in the .htaccess file. so here is the content of it..:

 

Options +FollowSymLinks

RewriteEngine On

RewriteBase /

 

RewriteRule ^(.*)-p-(.*).html$ product_info.php?products_id=$2&%{QUERY_STRING}

RewriteRule ^(.*)-c-(.*).html$ index.php?cPath=$2&%{QUERY_STRING}

RewriteRule ^(.*)-m-([0-9]+).html$ index.php?manufacturers_id=$2&%{QUERY_STRING}

RewriteRule ^(.*)-pi-([0-9]+).html$ popup_image.php?pID=$2&%{QUERY_STRING}

RewriteRule ^(.*)-t-([0-9]+).html$ articles.php?tPath=$2&%{QUERY_STRING}

RewriteRule ^(.*)-a-([0-9]+).html$ article_info.php?articles_id=$2&%{QUERY_STRING}

RewriteRule ^(.*)-pr-([0-9]+).html$ product_reviews.php?products_id=$2&%{QUERY_STRING}

RewriteRule ^(.*)-pri-([0-9]+).html$ product_reviews_info.php?products_id=$2&%{QUERY_STRING}

RewriteRule ^(.*)-i-([0-9]+).html$ information.php?info_id=$2&%{QUERY_STRING}

 

i don't know anything with mod_rewrite and stuff, so this is a big problem with me.. because what i do know is that a search engine will give up indexing my pages real fast with such long links...

 

so if u have any solutions for me.. i am looking forward..:) tnx....

:thumbsup:

Hard Work Is The Simplest Way Of Success

Posted
Okay Monika, here is my config file from the includes directory... what am i supossed to modify here? because i have no ideea.. if u have any ideea... please tell me :)

<?php
/*
 $Id: configure.php,v 1.14 2003/07/09 01:15:48 hpdl Exp $

 osCommerce, Open Source E-Commerce Solutions
 http://www.oscommerce.com

 Copyright (c) 2003 osCommerce

 Released under the GNU General Public License
*/

// Define the webserver and path parameters
// * DIR_FS_* = Filesystem directories (local/physical)
// * DIR_WS_* = Webserver directories (virtual/URL)
define('HTTP_SERVER', 'http://www.angelosoft.ro');
define('HTTPS_SERVER', 'http://www.angelosoft.ro');
define('ENABLE_SSL', false); // secure webserver for checkout procedure?
define('HTTP_COOKIE_DOMAIN', 'http://www.angelosoft.ro');
define('HTTPS_COOKIE_DOMAIN', 'http://www.angelosoft.ro');
define('HTTP_COOKIE_PATH', '/');
define('HTTPS_COOKIE_PATH', '/');
define('DIR_WS_HTTP_CATALOG', '/');
define('DIR_WS_HTTPS_CATALOG', '/');
define('DIR_WS_IMAGES', '/images/');
define('DIR_WS_ICONS', '/icons/');
 define('DIR_WS_INCLUDES', 'includes/');
 define('DIR_WS_BOXES', DIR_WS_INCLUDES . 'boxes/');
 define('DIR_WS_FUNCTIONS', DIR_WS_INCLUDES . 'functions/');
 define('DIR_WS_CLASSES', DIR_WS_INCLUDES . 'classes/');
 define('DIR_WS_MODULES', DIR_WS_INCLUDES . 'modules/');
 define('DIR_WS_LANGUAGES', DIR_WS_INCLUDES . 'languages/');

 define('DIR_WS_DOWNLOAD_PUBLIC', 'pub/');
 define('DIR_FS_CATALOG', dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME']));
 define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/');
 define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/');

// define our database connection
define('DB_SERVER', 'localhost');
define('DB_SERVER_USERNAME', '#');
define('DB_SERVER_PASSWORD', '#');
define('DB_DATABASE', '#');
 define('USE_PCONNECT', 'false'); // use persistent connections?
define('STORE_SESSIONS', 'mysql');
?>

 

there is no "http://" in a cookie domain

Treasurer MFC

Posted

Amanda is right, I'd try these settings:

 

// Define the webserver and path parameters

// * DIR_FS_* = Filesystem directories (local/physical)

// * DIR_WS_* = Webserver directories (virtual/URL)

define('HTTP_SERVER', 'http://www.angelosoft.ro');

define('HTTPS_SERVER', 'http://www.angelosoft.ro');

define('ENABLE_SSL', false); // secure webserver for checkout procedure?

define('HTTP_COOKIE_DOMAIN', .angelosoft.ro');

define('HTTPS_COOKIE_DOMAIN', .angelosoft.ro');

:-)

Monika

 

addicted to writing code ... can't get enough of databases either, LOL!

 

my toolbox: Textpad - Compare and Merge - phpMyAdmin - WS_FTP - Photoshop - How to search the forum

 

Interactive Media Award July 2007 ~ category E-Commerce

my advice on the forum is for free, PMs where you send me work are considered consultation which I charge for ...

Posted
Amanda is right, I'd try these settings:

 

// Define the webserver and path parameters

// * DIR_FS_* = Filesystem directories (local/physical)

// * DIR_WS_* = Webserver directories (virtual/URL)

define('HTTP_SERVER', 'http://www.angelosoft.ro');

define('HTTPS_SERVER', 'http://www.angelosoft.ro');

define('ENABLE_SSL', false); // secure webserver for checkout procedure?

define('HTTP_COOKIE_DOMAIN', .angelosoft.ro');

define('HTTPS_COOKIE_DOMAIN', .angelosoft.ro');

Oh my GOD!!! it really works.. YEss..!! thank u soo much...!!! you really made my day... thank you very much monica and amanda... :D :D :D :D :thumbsup:

Posted

Mmmm, i think that i may have another problem here. Check this out. It is true that now when i am accesing my site from my computer i get the links without the session ids, but when i am accesing the site from a different computer, well, the first time I enter my site, the links are still the same, WITH THE SESION IDS AT THE END. After i click on a link it becomes normal - without session id in the back. So i am worried... because this may still be a problem for search engines - when an engine is searching my links, the first time he enters, is going to get the long string link. So i am a little confused here. Any ideas !!!??? :'(

Posted

if you set in admin/session the parameter correctly for sessions and spiders, they will not get a session ID - I've never had problems with that

:-)

Monika

 

addicted to writing code ... can't get enough of databases either, LOL!

 

my toolbox: Textpad - Compare and Merge - phpMyAdmin - WS_FTP - Photoshop - How to search the forum

 

Interactive Media Award July 2007 ~ category E-Commerce

my advice on the forum is for free, PMs where you send me work are considered consultation which I charge for ...

Posted
there is a contribution that I think is a must, that prevents all spiders from getting session id's.

 

when that fix is aplied, no search engine should get a session id.

 

when some are allready set you might want to think about a fix alike done in my post here

 

that should get you there

 

the only thing that "fix" does is also go over the spiders.txt list if you force cookies something it normally does not do as is assumed that spiders do not accept cookies. That means that even then you go over that list on every page load to catch the rare event that a spider accepts a cookie, a chance of about 0.001%.

I know as I monitor these things.

 

so it is a fix for niks that only results in slower page loads.

if you normally have your spiders.txt facility up to date and turned on, no spider will ever get a session, no need to fix anything.

 

if you want to test these things then test them as a spider, do not simply assume that what you experience in your browser is the same.

Treasurer MFC

Posted
if you set in admin/session the parameter correctly for sessions and spiders, they will not get a session ID - I've never had problems with that

Hey Monika, as always u are here to give me a hand - 10x in advance...

 

I checked the sessions in the admin and here is what I discovered:

 

by default i had the next options:

session directory: /tmp

Force Cookie Use: False

Check SSL Session ID: False

Check User Agent: False

Check IP Address: False

Prevent Spider Sessions: False

Recreate Session: False

 

So with this settings I still got the oscId at the end of the links, althought after i click on a link they become short - without the oscid at the end...

 

I changed the sessions option in admin like this:

 

session directory: /tmp

Force Cookie Use: False

Check SSL Session ID: False

Check User Agent: False

Check IP Address: False

Prevent Spider Sessions: True

Recreate Session: False

 

After doing this i get the url clean from the beginig without having to click on a link first.... but the problem is that an user cannot login anymore, saying that the browser doesn't have cookies enabled... althought they are enabled..:(.... so i tweaked the settings once more....

this time like this

 

session directory: /tmp

Force Cookie Use: True

Check SSL Session ID: False

Check User Agent: False

Check IP Address: False

Prevent Spider Sessions: True

Recreate Session: False

 

This time everything goes well.... the shopping cart is good.. the users can login and make orders... i recive the orders via email... so everything is heaven!.... But... there's allways a but... :'( ... i think that by setting the prevent spider sessions true,... the search engines will not index me anymore.... is it true? how is this supossed to help me if it keeps the search engines spiders away from me?... how am I going to make this work? Monika u helped me so many times... if u can help me once more... please pretty please... help me..

i am becoming more and more disperate with this.... :( :(

Posted

The settings I use exclusively ... never needed anything else ... are these:

 

session directory: /tmp

Force Cookie Use: False

Check SSL Session ID: False

Check User Agent: False

Check IP Address: False

Prevent Spider Sessions: True

Recreate Session: False

 

of course, your cookie settings in config.php must be set correctly for this to work. Post the upper lines of your file up to the cookie domains, and I'll fix them for you.

:-)

Monika

 

addicted to writing code ... can't get enough of databases either, LOL!

 

my toolbox: Textpad - Compare and Merge - phpMyAdmin - WS_FTP - Photoshop - How to search the forum

 

Interactive Media Award July 2007 ~ category E-Commerce

my advice on the forum is for free, PMs where you send me work are considered consultation which I charge for ...

Posted

Dear Monika, here is my configure.php file

 

<?php
/*
 $Id: configure.php,v 1.14 2003/07/09 01:15:48 hpdl Exp $

 osCommerce, Open Source E-Commerce Solutions
 http://www.oscommerce.com

 Copyright (c) 2003 osCommerce

 Released under the GNU General Public License
*/

// Define the webserver and path parameters
// * DIR_FS_* = Filesystem directories (local/physical)
// * DIR_WS_* = Webserver directories (virtual/URL)
define('HTTP_SERVER', 'http://www.angelosoft.ro');
define('HTTPS_SERVER', 'http://www.angelosoft.ro');
 define('ENABLE_SSL', false); // secure webserver for checkout procedure?
define('HTTP_COOKIE_DOMAIN', 'angelosoft.ro');
define('HTTPS_COOKIE_DOMAIN', 'angelosoft.ro');
define('HTTP_COOKIE_PATH', '/');
define('HTTPS_COOKIE_PATH', '/');
define('DIR_WS_HTTP_CATALOG', '/');
define('DIR_WS_HTTPS_CATALOG', '/');
define('DIR_WS_IMAGES', '/images/');
define('DIR_WS_ICONS', '/icons/');
 define('DIR_WS_INCLUDES', 'includes/');
 define('DIR_WS_BOXES', DIR_WS_INCLUDES . 'boxes/');
 define('DIR_WS_FUNCTIONS', DIR_WS_INCLUDES . 'functions/');
 define('DIR_WS_CLASSES', DIR_WS_INCLUDES . 'classes/');
 define('DIR_WS_MODULES', DIR_WS_INCLUDES . 'modules/');
 define('DIR_WS_LANGUAGES', DIR_WS_INCLUDES . 'languages/');

 define('DIR_WS_DOWNLOAD_PUBLIC', 'pub/');
 define('DIR_FS_CATALOG', dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME']));
 define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/');
 define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/');

// define our database connection
define('DB_SERVER', 'localhost');
define('DB_SERVER_USERNAME', '@@@');
define('DB_SERVER_PASSWORD', '@@@');
define('DB_DATABASE', '@@@');
 define('USE_PCONNECT', 'false'); // use persistent connections?
define('STORE_SESSIONS', 'mysql');
?>

:) :) :) :blush: :blush: :blush:

Posted

try

 

define('HTTP_COOKIE_DOMAIN', '.angelosoft.ro');

define('HTTPS_COOKIE_DOMAIN', '.angelosoft.ro');

:-)

Monika

 

addicted to writing code ... can't get enough of databases either, LOL!

 

my toolbox: Textpad - Compare and Merge - phpMyAdmin - WS_FTP - Photoshop - How to search the forum

 

Interactive Media Award July 2007 ~ category E-Commerce

my advice on the forum is for free, PMs where you send me work are considered consultation which I charge for ...

Posted
try

 

define('HTTP_COOKIE_DOMAIN', '.angelosoft.ro');

define('HTTPS_COOKIE_DOMAIN', '.angelosoft.ro');

 

i made the changes... but now when i try to connect as an user, i am redirected to cookie_usage.php and i can't login... any other ideeas?

Posted

why is it that when i set prevent spider session true the common users cannot access their accounts anymore.. - when they try to login they are being redirected to the cookie_usage.php. any ideeas how to get over this? looking forward for an answer!

Posted
why is it that when i set prevent spider session true the common users cannot access their accounts anymore.. - when they try to login they are being redirected to the cookie_usage.php. any ideeas how to get over this? looking forward for an answer!

 

you still have force cookies set to true

Treasurer MFC

Posted
you still have force cookies set to true

 

i checked the session settings and here is what i have:

 

session directory: /tmp

Force Cookie Use: False

Check SSL Session ID: False

Check User Agent: False

Check IP Address: False

Prevent Spider Sessions: True

Recreate Session: False

 

and this is the configure.php

 

// Define the webserver and path parameters
// * DIR_FS_* = Filesystem directories (local/physical)
// * DIR_WS_* = Webserver directories (virtual/URL)
define('HTTP_SERVER', 'http://www.angelosoft.ro');
define('HTTPS_SERVER', 'http://www.angelosoft.ro');
 define('ENABLE_SSL', false); // secure webserver for checkout procedure?
define('HTTP_COOKIE_DOMAIN', 'angelosoft.ro');
define('HTTPS_COOKIE_DOMAIN', 'angelosoft.ro');
define('HTTP_COOKIE_PATH', '/');
define('HTTPS_COOKIE_PATH', '/');
define('DIR_WS_HTTP_CATALOG', '/');
define('DIR_WS_HTTPS_CATALOG', '/');
define('DIR_WS_IMAGES', '/images/');
define('DIR_WS_ICONS', '/icons/');

 

with this settings when i try to connect as an user i am redirected to the cookie_usage.php.

why is this happening? i can't understand why an user cannot connect anymore to his account...

 

If i set "Force Cookie Use" TRUE, then it works fine... but i have no ideea what impact is this going to have... what if an user doesn't have cookies enabled? what is going to happen then?

Any ideeas?

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...