How much control do you have over the AJAX calls? There is an old trick which involves dynamically rendering <script> tags. I've used the trick on a couple of projects, and it seems to work very well providing you don't need to POST data.
Do a Google for Dynamic Script Tags and you should find some good examples. I'm using the technique for my interactive xmas lights project, http://www.pacificlights.co.nz/en/2009/telecontrol. Thanks, Nathan. -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Chris Sent: Sunday, 13 December 2009 8:54 p.m. To: NZ PHP Users Group Subject: [phpug] Calling a JavaScript file from a subdomain 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] -- NZ PHP Users Group: http://groups.google.com/group/nzphpug To post, send email to [email protected] To unsubscribe, send email to [email protected]
