Page 1 of 1

Changing the image directory to outside the root of the site

Posted: Sat Jul 11, 2009 12:48 am
by Rokskul
I am hoping someone here to can help me with this as I have spent a lot of time searching for an answer.

Here is the scenario. I have a site the is massive in size and loads slowly and is a pain to keep synchronized with the dev server and the repository where it is backed up. I want to break the site up into static content and dynamic content on different URLs. So all images on one sub domain, all javascript on another, etc. This will not only provide the site with loading speed but ease of managing the files.

I have Joomla 5.0.12 installed on a domain
mysite.com

I have an images folder that the template file references on a sub domain
img.mysite.com

In IIS 6 I have created a virtual folder on the main site that points to the sub domain.
mysite.com/images/stories/virtual/ -> img.mysite.com

I have put an image file into the sub domain site and accessed it just fine through the virtual folder using a web browser.
mysite.com/images/stories/virtual/picture.jpg

What I need to do now though is tell Joomla to access either the content on img.mysite.com instead of looking in the default location (images/stories) or to get it to recognize the virtual folder inside of the images/stories directory. When accessing the virtual folder through the media manager it returns no file or folder listings.

Can anyone help me track down where I might be able to tell Joomla to access with the sub domain as my images directory or a way to get it to recognize the virtual folder? Thank you.

Re: Changing the image directory to outside the root of the site

Posted: Sat Jul 11, 2009 6:45 am
by devilboy_1989
I'm not sure but in Global Configuration there is an options for chaning the Images Path..

Global Configuration - Server - scorll down to the Media Settings...
Default is images/stories here put your path e.g. img.mysite.com

I Hope This Helps...
If Its works don't forget to post the reply...

Thank You
Devil Boy

Re: Changing the image directory to outside the root of the site

Posted: Sun Jul 12, 2009 3:34 pm
by Rokskul
Thanks for the reply. Unfortunately although I can change that path in the configuration it is relative to the site. What happens is if I change the path to img.mysite.com it will create a final path of mysite.com/img.mysite.com.

I am sure that it might seem a bit odd to some people to be changing that path, but I have so many images in the site that for speed and management purposes I want to move all of the images outside of the root of the site so I can manage images independently of the main site files.

Re: Changing the image directory to outside the root of the site

Posted: Sat Aug 29, 2009 1:43 pm
by bobcline
I am new to Joomla! but have a thoought for you if all other alternatives don't work.

You could (or engage someone who can) write a couple of scripts that would read the images on the external directory and populate the individual directories xxx/images/stories and a second that would extract the images from the xxx/images/stories directories and populate the external directories.

The file names in the external directories could contain the path information from the original location of the images.

This could be set up in a cron file with an automatic execution - much like a backup / restore function.

Let us know if you find a solution.

Bob