Forum Moderators: phranque
The main site has a link to the sub-domain directories and when you went to the site using those links the pages looked fine. The link from the main pages to the sub-domain pages look like...
http://www.example.com/subdomain
Where the main page inside the sub-domain folder was called "index.htm"
However when you went directly to the sub-domain in the address bar as in...
http://subdomain.example.com
All the images would be screwed up, you couldn't see any of them. I tried scripting the pages to go one level up and look for the images folder, but it still wouldn't work if you went to the site this way.
I contacted the hosting company and they said that the only way it would work is if I put a copy of the images folder inside the sub-domain folder along with a copy of my navigation folder. Essentially I had to have an encapsulated version of my site in this sub-domain folder to make it work correctly.
I did this and it works fine, but I was wondering if anyone else that uses sub-domains knows if this is the standard way to set it up. It just seems redundant and a waste of server space to have my images and navigation folders copied multiple times (one time per sub-domain folder) plus once at the root level for the rest of the site pages to use.
[edited by: phranque at 1:54 am (utc) on Jan. 26, 2009]
[edit reason] exemplified urls [/edit]
If you did an absolute reference to your images from the subdomain that should solve things: ex. http://example.com/images/001.gif
I thought about doing this, but decided I didn't really want to re-program all the image links. Maybe I will do that when I have more time. Both you answered my question about it being totally separate. Thanks!