Another angle to look at is setting the document.domain property on your 
pages.  I think from memory that if you set the document.domain property 
of pages loaded on the subdomain to the url of the root domain then ajax 
calls to the root domain from a subdomains will work without causing 
cross domain errors.  This is a useful trick when dealing with 
javascript between iframes (when one frame is on a subdomain)

see: 
http://en.allexperts.com/q/Javascript-1520/cross-browser-access-denied.htm


Aaron

Chris wrote:
> Hi all,
>
> I have a website with a number of subdomains that are all hosted on
> the same server.
> On the root domain I have a javascript file that is used by all the
> subdomains and I like to keep the JS file on the root domain rather
> than coping it to every subdomain.
> How can a subdomain load the javascript file using a relative path to
> avoid doing Ajax calls on a cross domain?
>
> Is it possible to do an Internal Rewrite for a short url in Apache
> htaccess file
> RewriteRule ^base/(.+)?$  /path_to_root/$1 [L]
>
> Any ideas?
>
> Thank you for your help in advance
>
>   
> ------------------------------------------------------------------------
>
>
> No virus found in this incoming message.
> Checked by AVG - www.avg.com 
> Version: 9.0.716 / Virus Database: 270.14.105/2561 - Release Date: 12/13/09 
> 08:39:00
>
>   

-- 
NZ PHP Users Group: http://groups.google.com/group/nzphpug
To post, send email to [email protected]
To unsubscribe, send email to
[email protected]

Reply via email to