Home > Software engineering >  Remove OScsid id from URL in osCommerce
Remove OScsid id from URL in osCommerce

Time:08-11

I am trying to remove OSCSID id from url in osCommerce but didn't able to success.

Below is my code for that.

define('HTTP_COOKIE_DOMAIN', 'http://www.domainname.com');
define('HTTPS_COOKIE_DOMAIN', 'http://www.domainname.com');

Is there any other way to remove this id from URL?

CodePudding user response:

I have found the solution for above my question.

For removing OSCSID from site url, kindly follow below steps.

Go to the back-end section -> configuration -> session -> Force Cookie Use -> Enable this option and check at front-end side. OSCID will be removed from URL.

Note: You cannot use shared ssl with Force Cookies on.

CodePudding user response:

Here is the solution

1) Open ".htaccess" file. (you can find this file on root directory of the site.)

2) add following line at the end of file

AddHandler application/x-httpd-php52 .php .php5 .php4 .php3

Actually above line changes PHP version of your site. I change my site PHP version into 5.2 and oscsid from web site all urls will automatically disappear.

If PHP5.2 version is not working for your site. you can also switch into other PHP versions for using these lines one by one

To switch to PHP 4.0:

AddHandler application/x-httpd-php4 .php .php4 .php3

To switch to PHP 5.0:

AddHandler application/x-httpd-php5 .php .php5 .php4 .php3

To switch to PHP 5.1:

AddHandler application/x-httpd-php51 .php .php5 .php4 .php3

To switch to PHP 5.2:

AddHandler application/x-httpd-php52 .php .php5 .php4 .php3

To switch to PHP 5.3:

AddHandler application/x-httpd-php53 .php .php5 .php4 .php3

To switch to PHP 5.4:

AddHandler application/x-httpd-php54 .php .php5 .php4 .php3

To switch to PHP 5.5:

AddHandler application/x-httpd-php55 .php .php5 .php4 .php3

To switch to the secure PHP 5.2 with Suhosin patch:

AddHandler application/x-httpd-php52s .php .php5 .php4 .php3

To switch to PHP 5.6:

AddHandler application/x-httpd-php56 .php

To switch to PHP 7:

AddHandler application/x-httpd-php7 .php

To switch to PHP 7.1:

AddHandler application/x-httpd-php71 .php

Try your luck and check which version is suitable for you.

  • Related