I have very specific problem and I don't even know if I am asking at right place and if it is even possible.
I have two domains, lets say domain1.com and domain2.com. Both domains share same root directory. So each file from www.domain1.com/file_url is accessible also as www.domain2.com/file_url
I am looking for a way, how to disable SOME of the files when requested with domain2.com. But not all of them, but just selected ones. Is it possible to set some "flag" or attribute for a file so Apache would recognize it and denied it when requested with domain2.com ?
Right now, the only solution which come to my mind is to create PHP script and use rewrite of each file in the directory and implement this "flag" checking inside this PHP file. But that would cost a lot of system resources, so I would thought if this could be done else ?
I have forgotten to specify that I am dealing with MANY files ( = thousands ), so I am not able to manually change config file for Apache. And those files are constantly growing since they are user-uploaded. Sorry I forgot to mention this important detail.