Symbolic Link and Updates
Hi!
I'm trying to create a symlink for a directory with images that will be used on several websites. All of the websites will be added as Addon domains.
I've been messing around and it would seem that symlinks do not stay "current". So, if I add an image to the image directory, the symlink will not reflect the change.
Also, in my attempts, I'm unable to grab the sub-directories from the image directory.
Is there a way to keep the symlink updated? And, is there a way to include subdirectories in the symlink as well?
Thank you in advance for any details or suggestions you may throw my way.
-
Quick update! I was able to figure out how to include the sub-directories using the lndir command. However, I still need to figure out how to keep the symlink up to date with my latest images. This is the final piece I need help with but I will definitely keep researching and post my findings. 0 -
Hello, Have you considered configuring the websites to use the direct path to the same images directory? This would allow you to avoid setting up symbolic links, as the Addon domain names are all part of the same cPanel account. Thank you. 0 -
Hello, Have you considered configuring the websites to use the direct path to the same images directory? This would allow you to avoid setting up symbolic links, as the Addon domain names are all part of the same cPanel account. Thank you.
I've thought about this but my only problem would be converting the path to a URL. Unfortunately, for the platform I'm using to build these websites, it requires an absolute path/URL for the images. I just thought a symbolic link would be best since I can easily generate a URL in this case.0 -
Hello, You may find the following third-party URLs helpful: Creating symbolic link recursively How to create symbolic links to all files (class of files) in a directory? Thank you. 0
Please sign in to leave a comment.
Comments
4 comments