Thanks Jim,
So, I'll have to use a variable with the actual domain name i.e.
$baseaddr = "http://www.actualdomain.com/common/";;

All the sub-domains use the same format, images, styles and common php modules.
Seems a waste to have to edit them all individual.

I seem to remember reading somewhere that system admins don't like you to use 
absolute addressing.
Is this true, or I'm I mistaken?



----- Original Message ----- 
From: "captain_jims" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Thursday, July 14, 2005 9:41 AM
Subject: [php-list] Re: sub-domains


> The answer to this question is that it depends on how the web server
> is setup.  
> 
> Simplifying greatly:
> First, virtual directories are established and then the domains are
> assigned to them. The root directory is usually the domain name and
> the default virtual directory.
> 
> Then, the sub domain names are assigned to perhaps the same or other
> virtual directories. But most typically to directories that are lower
> in the directory structure that the domain related directory.
> 
> Every virtual directory is a root, and the security settings of the
> server config do not allow you to go up the directory structure above
> the root, ie, the directory assigned to the virtual directory.
> 
> In other words, the server admin is in control here.  And he can build
> a variety of combinations. On my main server, I have multiple domain
> names pointed to the same virtual directory with different behaviors
> configured depending on the domain name used. Not what you want, but
> an example of how the server admin can change the behavior.
> 
> Jim
> 
> 
> --- In [email protected], "Bob" <[EMAIL PROTECTED]> wrote:
>> If you've got sub-domains on a server, how do you access a root
> directory from a sub-domain?
>> As they are sub-domains, I obviously can't use
> $_SERVER['DOCUMENT_ROOT'];
>> 
>> I thought $_SERVER['HTTP_HOST']; or $_SERVER['SERVER_NAME']; might
> do it, but it doesn't.
>> Is this possible?
>> TIA.



Community email addresses:
  Post message: [email protected]
  Subscribe:    [EMAIL PROTECTED]
  Unsubscribe:  [EMAIL PROTECTED]
  List owner:   [EMAIL PROTECTED]

Shortcut URL to this page:
  http://groups.yahoo.com/group/php-list 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/php-list/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to