This is a little hard to explain but i will try to make it as clear as possible.
Firstly here's the setup, 2 databases on 2 different servers (databases are identical) now within the first database is a bunch of locations to images, though instead of a full path it only includes the file name not an absolute path( e.g. image.jpg).
Now im trying to copy the names to another database this is no problem but obviously the the images don't exist on the 2nd server so the file names point to no where.
So initially what i want to accomplish is to somehow add the absolute/full url to the file name (e.g. http://www.google.com/image.jpg).
Now because of the system im modifying, it retrieves the file names then adds its own path prefix to the images which is different between both servers),
i.e. on the first server it will grab the file name (e.g. image.jpg) and add to it "http://www.website1/images/listing_img/" so when display it will look like "http://www.website1/images/listing_img/image.jpg".
Now on the second server the image location will come out as "http://www.website2/realty/images/listing_img/image.jpg".
So i thought maybe if i just copied all the images from server to other according to there corresponding directories, followed by copying the names i could get the images displayed on the second website. But upon investigating found the images directory to be overly large making this a bad choice.
Now any ideas on how to achieve this would be greatly welcome,
Firstly here's the setup, 2 databases on 2 different servers (databases are identical) now within the first database is a bunch of locations to images, though instead of a full path it only includes the file name not an absolute path( e.g. image.jpg).
Now im trying to copy the names to another database this is no problem but obviously the the images don't exist on the 2nd server so the file names point to no where.
So initially what i want to accomplish is to somehow add the absolute/full url to the file name (e.g. http://www.google.com/image.jpg).
Now because of the system im modifying, it retrieves the file names then adds its own path prefix to the images which is different between both servers),
i.e. on the first server it will grab the file name (e.g. image.jpg) and add to it "http://www.website1/images/listing_img/" so when display it will look like "http://www.website1/images/listing_img/image.jpg".
Now on the second server the image location will come out as "http://www.website2/realty/images/listing_img/image.jpg".
So i thought maybe if i just copied all the images from server to other according to there corresponding directories, followed by copying the names i could get the images displayed on the second website. But upon investigating found the images directory to be overly large making this a bad choice.
Now any ideas on how to achieve this would be greatly welcome,
Comment