radhavallabh Posted March 1, 2017 Share Posted March 1, 2017 Hi, I am trying to use subdomain for serving images- My subdomain also points to the same folder as the store. http://www.xxx.com ---- Both resolve at same http://www.store.xxx.com ---- Both resolve at same So images path should show as below http://www.store.xxx.com/images/........ I tried editing configure.php image path but it appends the subdomain url to the actual store url ending in image path. Which hence breaks serving of the image. I tried adding below code to get this working in includes/function/html_output.php in tep_image function function tep_image($src, $alt = '', $width = '', $height = '', $parameters = '') { if ($request_type != 'SSL'){ $src = str_replace(HTTP_SERVER . DIR_WS_HTTP_CATALOG . DIR_WS_IMAGES, 'http://www.store.xxx.com/', $src); } else{ } But it does not work yet the image path remains the same as before no change... Please I request to help me out. If there is any other way to get it working I would happily test it out too. I really want to get the subdomain working to serve for image paths. Help would be deeply appreciated Thank you in advance ; Regds/ radhavallabh Link to comment Share on other sites More sharing options...
♥ecartz Posted March 10, 2017 Share Posted March 10, 2017 Try function tep_image($src, $alt = '', $width = '', $height = '', $parameters = '') { if ($request_type != 'SSL'){ $src = str_replace(DIR_WS_HTTP_CATALOG . DIR_WS_IMAGES, 'http://www.store.xxx.com' . DIR_WS_HTTP_CATALOG . DIR_WS_IMAGES, $src); } If that doesn't work, you would need to post the relevant section of configure.php. I.e. the DIR_WS_ and HTTP_SERVER entries. You also might post more details about what you tried and what actually happened. Always back up before making changes. Link to comment Share on other sites More sharing options...
radhavallabh Posted March 10, 2017 Author Share Posted March 10, 2017 @@ecartz Thank you so much for your valuable input will surely try the same and get back with the result.... Warm Regds/ radhavallabh Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.