Question about Subdomains and Linking images from outside folders

noimad1

Well-Known Member
Mar 27, 2003
629
0
166
I have a user that set up a subdomain, lets say:

http://bob.hisdomain.com

which of course automatically creates the folder in http://hisdomain.com/bob

The customer has uploaded an index file to the bob folder, however, he is using relative paths instead of URL paths in his links and images that are above his subdomain folder. For example he is trying to do this:

PHP:
<img src = "../images/bob.jpg">

instead of
<img src = "http://hisdomain.com/images/bob.jpg">
now, if he goes to http://bob.hisdomain.com the picture doesn't show up. But if he goes to http://hisdomain.com/bob it does show up.

I guess my question is, if he is using it as a subdomain, does it run as a different user or something that would now allow the subdomain to access folders above its own folder?
 

fwwebs

Well-Known Member
Feb 16, 2004
329
0
166
The sub-domain has it's own web directory, so when calling the image using ../images, it will look for the folder /bob/images, since bob is the root web directory.
 

noimad1

Well-Known Member
Mar 27, 2003
629
0
166
fwwebs said:
The sub-domain has it's own web directory, so when calling the image using ../images, it will look for the folder /bob/images, since bob is the root web directory.
So there is no way to get images from any directories above bob other than using the full URL in the tag?