The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

symlink with differnet accounts

Discussion in 'General Discussion' started by napraviculom, Mar 23, 2010.

  1. napraviculom

    napraviculom Member

    Joined:
    Dec 30, 2009
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    1
    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) :
    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?
     
Loading...

Share This Page