When having two domains on a same account (in WHM) I can create a symlink like this:
THE DOMAINS:
- mydomain1.com - contains folder named 'upload' with images I want to be displayed on mydomain2.com
- mydomain2.com - the domain showing the images from mydomain1.com/upload
THIS IS A FILE mydomain2.com/test.php
Code:
$target = 'http://www.mydomain1.com/upload/';
$link = 'images;
symlink($target, $link);
Now I can get images located in mydomain1.com/upload like this (in a file mydomain2.com/show.php). It permanently creates link 'images' which points to mydomain1.com/upload.
Code:
<img src="images/image1.jpg" />
But when I have two different accounts this doesn't seem to work.
Basically, I want to hide the folder with images so that the page source will show "images/image1.jpg" instead of "http://www.mydomain1.com/upload/image1.jpg"
Any ideas?
|