I've got two domains:
www.domain1.com
www.domain2.com
They should both use the files on:
test.domain3.com
In my files I've put a code that looks to the current link (for example: www.domain1.com) and then he looks in my database for the settings (like language and theme) of that domain.
Both domains should work on their own.
Also some files must be excluded. For example: www.domain1.com/forum must use files from www.domain1.com.
How can I do this?