Hi. I am not sure if this is the most relevant place to post this, but here goes.
I have just got a new hosting account, which lets me set up multiple "partitions". Each partition has its own IP address, root directory and database. Unfortunately, I want all my domains to point at one directory on one of the partitions, but the host only allows me to point domains to directories within its partition.
I can't just straight .htaccess them because I need the actual domain to be preserved in the environmental variables.
For example, I could do this:
^domaina.com/\.*$ domainb.com?=$1
This would point domaina.com to my centralised files on domainb.com, but SERVER_NAME will now think I am on domainb.com and would load the relevant data for domainb.com when I want it to load domaina.com data.
I know there is a proxy option [P] in mod_rewrite/apache. Will something like that keep the SERVER_NAME variable as domaina.com?
If that's not clear, I'll try and recap summarise. I have files that can be accessed at domainb.com, but if I forward all URLs of domaina.com to domainb.com, the server will just think domainb.com is accessing the files. I just need to preserve the SERVER_NAME var when doing a redirect, so my script knows which files to load.