Remove OScsid id from URL in osCommerce

青春壹個敷衍的年華 提交于 2019-12-07 08:03:56

问题


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?


回答1:


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.




回答2:


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.



来源:https://stackoverflow.com/questions/18123056/remove-oscsid-id-from-url-in-oscommerce

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!