- Code: Select all
/home/example.com/www DOCUMENT_ROOT for www.example.com
/home/example.com/admin DOCUMENT_ROOT for admin.example.com
I want to share some javascript, CSS and image files inside the www-folder. i've done this with a .htaccess in /home/example.com/admin
- Code: Select all
RedirectMatch ^/(pix|js|css)/(.*) http://www.example.com/$1/$2 [L]
this works perfect for CSS and images. And also for most javascripts. But some javascript-code has to be loaded from the same host as the html-file to work correct (e.g. for AJAX functionality).
how can i change this to load the javascript files from /home/example.com/www/js but deliver them through http://admin.example.com/js?
my idea is not to upload javascripts twice. an other possibility is to create a symbolic link from /home/example.com/admin/js to /home/example.com/www/js. but im not able to create symbolic links...
i hope it is clear what i mean.
thx