Welcome to WebmasterWorld Guest from 22.214.171.124
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>
allow from all
deny from office1.mysite.com
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
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)
Visitor_From ____ Where_does_he_enter_your_site ______ Where_to_send_him
www.yahoo.com _ [mydomain.com...] __ [mydomain.com...]
www.yahoo.com _ [mydomain.com...] _______ [mydomain.com...]
www.google.com _ [mydomain.com...] __ [www...]
www.google.com _ [mydomain.com...] ______ [www...]
-others- _______ [mydomain.com...] __ [mydomain.com...]
-others- _______ [mydomain.com...] ______ [mydomain.com...]
-others- _______ [spcl.mydomain.com...] ___ [mydomain.com...]
Whipping up the rewrite rules is the easy part - defining the problem clearly is hard... :)