Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Www. To Non-wwww


Orbixx

Recommended Posts

Posted

Hi people, I've an issue at hand, I've ordered an SSL certificate wrongly for a domain without the www's which currently seems non-refundable.

 

D'oh. >_<

 

So I'm looking for a way to get the osCommerce distrubtion to go to https://mysite.com/ as opposed to https://www.mysite.com/ which I have acheived, but all the images on the page are still using the www. and therefore causes certificate errors.

 

In html_output.php so far I have done:

 

$link = HTTPS_SERVER . DIR_WS_HTTPS_CATALOG;	  --->	   $link = 'https://mysite.com' . DIR_WS_HTTPS_CATALOG;

 

Which seemed to work for the URLs, but as for the images, it still went to the www version, so I did this too within the tep_image function in html_output.php:

 

$image = '<img src="' . $src . '"';	  --->	  $image = '<img src="https://mysite.com/' . $src . '"';

 

and another part (with code from the on the fly thumbnailer contrib):

 

$image = '<img src="/product_thumb.php?img=' . $src . '&w=' .
tep_output_string($width) . '&h=' . tep_output_string($height) . '"';

 

to

 

$image = '<img src="https://mysite.com/product_thumb.php?img=' . $src . '&w=' .
tep_output_string($width) . '&h=' . tep_output_string($height) . '"';

 

 

 

However this still does not cover all the images and I have found other functions, but I have no idea how I can edit them to put https://mysite.com in front of them.

 

Or am I just going about it completely the wrong way, because I can't seem to get the .htaccess code working that does a similar function.

Archived

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

×
×
  • Create New...