Forum Moderators: phranque

Message Too Old, No Replies

how to display image not in web dir?

         

mikeseo

4:48 am on Aug 20, 2005 (gmt 0)

10+ Year Member



How can I display a image on a webpage that is not in the public_html web directory? I want to have one directory of images that can be used by many different websites/accounts.

topr8

5:05 am on Aug 20, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



you would need to make 'virtual' folders that reference the image folder.

the virtual folder would need to be within the root of the domain concerned.

you need shell access to do this.

lammert

8:53 am on Aug 20, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Assuming you are using Linux with Apache, you can use symbolic links from your site to the central picture directory. You can create a symbolic link to the picture directory with the ln -s command in Linux. You must have shell access to the webserver. For example, if your website resides in /var/www/site1/public_html and you want to add /var/www/common_picture as a picture directory to that site, enter the command:

ln -s /var/www/common_picture /var/www/site1/public_html/picture

After this command, the pictures are available at the URL www.site1.com/picture/ Do this for every site where you want to have this common directory available.