By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,952 Members | 1,935 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,952 IT Pros & Developers. It's quick & easy.

Subdomains Retaining The Logos From The Root Domain

P: n/a
$_SERVER['DOCUMENT_ROOT'] returns the root path
for the subdomain, which is different than the root path for
the primary domain.

Is there a global variable to get the path for the root domain?

What's the best way to handle this when you want to keep
use the logo for the root domain?

--
Jim Carlock
Post replies to the group.
Jun 22 '06 #1
Share this Question
Share on Google+
4 Replies


P: n/a
Jim Carlock wrote:
$_SERVER['DOCUMENT_ROOT'] returns the root path
for the subdomain, which is different than the root path for
the primary domain.

Is there a global variable to get the path for the root domain?

What's the best way to handle this when you want to keep
use the logo for the root domain?


PHP doesn't know anything about the "root domain". It only knows which domain
you're currently using.

That's because the "root domain" is just another FQDN - and may reside on this
server, or another one anywhere in the world. Or, even if it is on the same
host, it might be in a completely different directory structure (nothing in common).

If you're using Apache, you can set up a link in your http.conf file; if you
don't have access to that you may be able to do it in your .htaccess file -
haven't tried. And, if course, if you're on Unix, you can set up a link to the
other directory.

Of, if you can't do any of the above, you can always copy the logo to another
directory within the subdomain's structure.
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attglobal.net
==================
Jun 22 '06 #2

P: n/a
"Jerry Stuckle" <js*******@attglobal.net> wrote:
If you're using Apache, you can set up a link in your http.conf
file;


You mean a ServerAlias? Don't think a ServerAlias will work
to well for this. Or an Alias? I'll have to find some more info
about Alias. Or a Location?

A link is an HTML anchor or a windows shortcut (.lnk) as
far as I currently know.

--
Jim Carlock
Post replies to the group.
Jun 22 '06 #3

P: n/a
On Thu, 22 Jun 2006 02:10:25 +0000, Jim Carlock wrote:
$_SERVER['DOCUMENT_ROOT'] returns the root path for the subdomain, which
is different than the root path for the primary domain.

Is there a global variable to get the path for the root domain?
No, for the reasons Jerry explains.
What's the best way to handle this when you want to keep use the logo
for the root domain?


I'd say use a full URL in the img src for the logo on the subdomains:

<img src="http://www.rootdomain.com/images/logo.png" />

Cheers,
Andy

--
Andy Jeffries MBCS CITP ZCE | gPHPEdit Lead Developer
http://www.gphpedit.org | PHP editor for Gnome 2
http://www.andyjeffries.co.uk | Personal site and photos

Jun 22 '06 #4

P: n/a
Jim Carlock wrote:
"Jerry Stuckle" <js*******@attglobal.net> wrote:
If you're using Apache, you can set up a link in your http.conf
file;

You mean a ServerAlias? Don't think a ServerAlias will work
to well for this. Or an Alias? I'll have to find some more info
about Alias. Or a Location?

A link is an HTML anchor or a windows shortcut (.lnk) as
far as I currently know.


Jim,

Yes, an Alias can work. And in Unix a link is effectively an alias for a
directory or file. It has nothing to do with HTML and is only remotely similar
to the windows shortcut.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attglobal.net
==================
Jun 22 '06 #5

This discussion thread is closed

Replies have been disabled for this discussion.