Find the answer to your Linux question:
Results 1 to 2 of 2
Hi There, is this possible? I have pared this question down to the bare essentials I have a web application in folder: Code: /home/library/webapp/[files are here] Now, I want to ...
  1. #1
    Just Joined!
    Join Date
    Apr 2003
    Posts
    52

    urgent request for help - symbolic links

    Hi There, is this possible?

    I have pared this question down to the bare essentials

    I have a web application in folder:
    Code:
    /home/library/webapp/[files are here]
    Now, I want to symbolically link to this in two different places

    Code:
    cd /home/site1
    ln -s /home/library/webapp webapp
    //this way /home/site1/webapp is actually a symbolic link
    
    cd /home/site2
    ln -s /home/library/webapp webapp
    //now site2 also has the webapp
    HERE IS THE PROBLEM:
    in both site1 and site2, I have an images folder:
    Code:
    /home/site1/images
    /home/site2/images
    which will contain different images
    however when I try this:
    Code:
    cd /home/library/webapp
    ln -s ../images images
    it does not work - because the symbolic link is registered absolutely vs. relatively (I think based on what I'm seeing).
    So IOW, both site1 and site2 have the webapp, but in both sites:

    Code:
    /home/site1/webapp/images
    /home/site2/webapp/images
    both link to

    Code:
    /home/library/webapp/images
    BOTTOM LINE FINALLY (and thank you for reading this carefully): Is there any way to make a symbolic link "relative" like this so that:

    Code:
    /home/site1/webapp/images -> /home/site1/images
    /home/site2/webapp/images -> /home/site2/images

    ???

  2. #2
    Just Joined!
    Join Date
    Jun 2009
    Posts
    2
    try using diferents folder for images1

    Then you can adda an htacces for each app read from images1 or images2

    something like
    one for one app and other for the other app
    rewrite rule images/(.*) images1/$1

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...