coldfusion - finding a way to replace images to proper url's -
i getting contents website: images coming as: /images/abc.gif, doing is attaching website url , giving me network error: here example of this
"networkerror: 404 not found - https://devl.example.com/segment/images/headcont.gif" headcont.gif "networkerror: 404 not found - https://devl.example.com/segment/images/newdetails.gif" newdetails.gif "networkerror: 404 not found - https://devl.example.com/segment/images/headsurr.gif"
i using code replace of images
<cfset lnk = replace(lnk,'"/images/sym_s_up.gif"','"http://thewebsite.com/images/sym_s_up.gif"','all')>
but above doing image specify, how can write kind of single code searches /images , replace them url irrespective of image name have specify
remove actual image name , search consistent string
<cfset lnk = replace(lnk,'/images/','http://thewebsite.com/images/','all')>
you take approach of replacing <img src="/images
, replacing full url.
Comments
Post a Comment