I have decided to create a mobile site on a subdomain of my main site. (I'm aware there are endless arguments about having one site or two; let's not get into that here).
The subdomain (http://subdomain.maindomain.co.uk) is of course also a sub-directory of the main domain.
To save work (and potential errors) I want to access images and other files from the main site rather than duplicate them all.
From what I've read (and tried) it seems that this has to be done with a full url, as in:
whereas if the subdomain were just a sub-directory I would use:HTML Code:<img src='http://maindomain.co.uk/images/imagename.jpg' />
(from a sub-directory of the subdomian)HTML Code:<img src='../../images/imagename.jpg' />
It seems to me that using the full URL must be slower, so before going ahead I'd like to check that there is no other (better) way.
I have looked briefly at mod_rewrite, but perhaps I got the code wrong, as it didn't work. But even if it did, it's still effectively going to be using the full URL, isn't it ?