Thread: MAX cdn
View Single Post
  #96  
Old 09-05-2013, 12:49 AM
 
kevinrm kevinrm is offline
 

X-Wizard
  
Join Date: Aug 2003
Posts: 1,003
 

Default Re: MAX cdn

Using Vivid Dreams as a substitute for books_and_magazines, , I have the strange problem where I can get images to show in https but not in non-secure mode http using this code:

// MaxCDN - next two lines commented out
//$smarty->assign('ImagesDir', $xcart_web_dir . $smarty_skin_dir . '/images');
//$smarty->assign('SkinDir', $xcart_web_dir . $smarty_skin_dir);
// MaxCDN add the following
if ($_SERVER['HTTPS'] != 'on')
{
$smarty->assign('ImagesDir', "http://cdn.domain.com" . $smarty_skin_dir . '/images');
$smarty->assign('SkinDir', "http://cdn.domain.com" . $smarty_skin_dir);
$smarty->assign("AltImagesDir", "http://cdn.domain.com/skin/books_and_magazines/images");
$smarty->assign("AltSkinDir", "http://cdn.domain.com/skin/books_and_magazines");
}
else
{
$smarty->assign('ImagesDir', $xcart_web_dir . $smarty_skin_dir . '/images');
$smarty->assign('SkinDir', $xcart_web_dir . $smarty_skin_dir);
}
// END MaxCDN edit

Any clue why it wouldn't show up in non-https mode? If I keep the original code, however, images show but not through MaxCDN of course.

When I try to call up an individual image in a new tab, I get a "403 Forbidden" notice...
__________________
X-Cart 5.4.1.39 Live
PHP 7.4.33
5.5.5-10.3.38-MariaDB MariaDB
Apache 2.4
CENTOS 7.8 64Bit Single Quad-Core E3-1241v3 3.4Ghz 8M 1600 w/ HT
32GB RAM 2x 512GB Samsung 850 Pro SSD RAID 1
Reply With Quote