Server things are pretty much beyond my knowledge, but I have learned to do a few simple things with .htaccess thanks to many of the helpful people here. What I'm now wondering is whether I can use .htaccess to direct visitors to different places depending upon the visitors' addresses. Example: anyone visiting my site from office1.mysite.com will be sent to "newoffice1", anyone visiting from office2.mysite.com will be sent to "newoffice2", and anyone visiting from any other address will be sent to "mainpage".
I suppose this is technically an example of cloaking, yes? I'm not using it for any nefarious purposes; I just want different groups of (human) users to be properly sent to new locations automatically.
One thing I have learned to do is to use the deny command to redirect someone coming from a particular site. If I put this in my .htaccess:
<Limit GET POST> order allow,deny allow from all deny from office1.mysite.com </Limit>
the "deny" will generate a 303 error, and I can put:
ErrorDocument 403 http:// newoffice1.mysite.com
and everyone coming from office1.mysite.com will be sent to newoffice1.
But is there a way to have more than one such redirect going to different places?
IF you have access permission for mod_rewrite, it's easy to implement the redirect.
But your queston isn't clear... Are you giving these groups different URLs, each beginning with a different subdomain on your site, and asking them to enter there? Or do you want to detect their host name or IP address, and redirect based on that? Either way, you can do it, but the details vary.
You example where you say "coming from office1.mysite.com" is what's got me confused, since this is part of your domain, and does not indicate where the user is really coming from.
How about giving us a nice neat map with at least three examples in this format: (Note: The underscores are just used to try to keep these columns lined up)