jpayam Posted August 20, 2016 Share Posted August 20, 2016 Hello, I install ssl om my site and it works fine only my problem is download links not works any more when customer click on download link http://mydomain.com/index.php?_a=download&accesskey=177debdf27b46d6967035cc8b1ffbe11 and link will redirect to : https://mydomain.comindex.php/?_a=download&accesskey=177debdf27b46d6967035cc8b1ffbe11 but if i change http://mydomain.com/index.php?_a=download&accesskey=177debdf27b46d6967035cc8b1ffbe11 to httpS://mydomain.com/index.php?_a=download&accesskey=177debdf27b46d6967035cc8b1ffbe11 then link works fine p.s : i use digit file on external url thanks in advance for help Quote Link to comment Share on other sites More sharing options...
bsmither Posted August 20, 2016 Share Posted August 20, 2016 When you installed the SSL, did you also add or change any information to CubeCart's .htaccess file? Quote Link to comment Share on other sites More sharing options...
jpayam Posted August 20, 2016 Author Share Posted August 20, 2016 1 hour ago, bsmither said: When you installed the SSL, did you also add or change any information to CubeCart's .htaccess file? No, but i just add this code to .htaccess file and problem has been fixed as Download links on emails and customers control panel has been changed to HTTPs automatically! RewriteEngine On RewriteCond %{HTTPS} off RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] still we when click on http://mydomain.com/index.php?_a=download&accesskey=177debdf27b46d6967035cc8b1ffbe11 redirect to wrong url : https://mydomain.comindex.php/?_a=download&accesskey=177debdf27b46d6967035cc8b1ffbe11 Quote Link to comment Share on other sites More sharing options...
bsmither Posted August 20, 2016 Share Posted August 20, 2016 Please find the file in your CubeCart installation /includes/global.inc.php, and look at its contents. Is this variable listed?$glob['rootRel'] If so, this variable and maybe some others are not needed by CC6. If not, then we need to look elsewhere. Quote Link to comment Share on other sites More sharing options...
jpayam Posted August 21, 2016 Author Share Posted August 21, 2016 $glob['rootRel'] is not listed, my /includes/global.inc.php contents: <?php $glob['adminFile'] = 'admin.php'; $glob['adminFolder'] = 'admin'; $glob['dbdatabase'] = 'X'; $glob['dbhost'] = 'localhost'; $glob['dbpassword'] = 'X'; $glob['dbprefix'] = ''; $glob['dbusername'] = 'X'; $glob['encoder'] = 'zend'; $glob['installed'] = '1'; $glob['license_key'] = ''; $glob['cache'] = 'file'; ?> Quote Link to comment Share on other sites More sharing options...
bsmither Posted August 21, 2016 Share Posted August 21, 2016 I'm thinking the problem may be a fault with the code. I'm looking at it now. Quote Link to comment Share on other sites More sharing options...
bsmither Posted August 21, 2016 Share Posted August 21, 2016 The problem in the code will affect more than just downloads. See: https://github.com/cubecart/v6/issues/1203 I will make a suggested edit, but I have no idea what else this will affect. Initial tests show no anomalous actions. I can't speak for any of the myriad of plugins, however. In the file /controllers/controller.index.inc.php: Using a programmer's text editor... Find near line 43: //Initialize SEO /**/ $GLOBALS['ssl'] = SSL::getInstance(); $GLOBALS['seo'] = SEO::getInstance(); Change to: //Initialize SSL and SEO $GLOBALS['ssl'] = SSL::getInstance(); $GLOBALS['seo'] = SEO::getInstance(); Find near line 49: //Initialize SSL $GLOBALS['ssl'] = SSL::getInstance(); Change to: //Initialize SSL //$GLOBALS['ssl'] = SSL::getInstance(); This switches the order of re-configuring the URL to be search engine friendly, and re-configuring the URL to be SSL if the store has SSL enabled. The actual problem with the code does not get fixed, however. What this edit does is to pre-configure the URL so that the problem code can let it slip through unharmed. Quote Link to comment Share on other sites More sharing options...
jpayam Posted September 19, 2016 Author Share Posted September 19, 2016 Thanks, I just update files in https://github.com/cubecart/v6/issues/1203 , and problem has been fixed . Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.