Hi Chris

Say your javascripts are currently located in
sub1.domain.co.nz/js
sub2.domain.co.nz/js
sub3.domain.co.nz/js

I would create a "global" symbolic link in each of the "js" folders
pointing to the folder containing the JS file in the root domain.
Then add a script tag to your page like
<script type="text/javascript" src="/js/global/root_file.js"></script>

Or use an alias instead of a symbolic link, if you're running on a
Windows server.

Todd

> 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
> 

-- 
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