Multiple domains and shared content question


When you host multiple domains on one account, how isolated are they? Can you have a common directory for shared content?

Can I have a directory outside of the root of my site’s root?

I would like to be able to share assets between multiple sites without making absolute URL calls.

My story is that I’ve got a family web site and separate URLs for each child. They do things together, so there is an overlap of some content. Currently I have to upload it to each site.
I want to know if I can have a common folder that both can access.

Maybe something like:

Would this work in script.php:

<?php include ../common/included.php; ?>

I would use this for common items like templates, images and other stuff. Each site would have its own config file and database.

This might seem odd, and it is. Sort of a design flaw I didn’t think of when we had our second child (sleep deprivation from the first).


Yes you can do it,
just use the same user for all these domains.

I never tried this with different users (within the same account).

Get [color=#CC0000]$97[/color] Off with promo code :[color=#CC0000]97USA[/color] :cool: -->choose your plan (promo code included)


Just some thoughts:

  1. The method you describe is one viable option - reference paths to outside the web directory.
  2. I think soft links are another option. This way you could immunize your site-specific code from the absolute location of the shared code.
  3. You could use SVN and deploy the shared scripts along with the site-specific scripts to each site. This way you have one source-code tree but can deploy different versions to different sites. Note that a kleenex and bubble-gum version of this is to copy the shared code to each site’s directory structure instead of using soft links. You then just have to remember to edit the source instead of the deployed version.

Free unique IP and $67 off with promo code [color=#CC0000]FLENSFREEIP67[/color] or use [color=#CC0000]FLENS97[/color] for $97 off. Click here for more options