Lets say i have domain.com and five other subdomains.
The subdomains are stored in separate folders from domain.com
In domain.com i am going to have 3 folders that i need to access when i am in other subdomains, i'm going to be accesing php, css, images, any stuff.
Each subdomain needs to have their own htaccess.
What is the best approach to do this? i've read something about open basedir, but i'm not exactly sure if this is the best way to do it or not. And neither how it works.
Thanks in advance
If it's on a different server, you could use the .htaccess
file to proxy the requests to the original domain (if you have mod_rewrite and mod_proxy enabled).
RewriteRule ^images/(.*)$ http://www.example.com/images/$1 [P]
If it's all on the same server:
ln -s /path/to/images /path/to/subdomain/images
. See the man page for ln for more information.Alias /image /path/to/images
in your .htaccess
or httpd.conf
.