On Thu, 13 Mar 2008, Szymon Bakowski wrote:
I was just wondering about in order to find a solution to my problem but haven`t come up with final solution yet: what i am after is to be able to serve the content of different directories after hitting the same IP based on incoming IP. I was thinking about mod_proxy but am not sure if this is the way to follow. Also, SSL may be involved and here I suppose my idea may possibly fail ? All suggestions more than welcome.
You should be able to match for REMOTE_ADDR in rewrite rules, and take it from there to access different "physical" directories. Say, something like:
RewriteCond %{REMOTE_ADDR} 10.1.1.1 [NC]RewriteRule ^/(.*) http://somehost.example.com/dir1/$1 [P,L]
RewriteCond %{REMOTE_ADDR} 10.1.1.2 [NC] RewriteRule ^/(.*) http://somehost.example.com/dir2/$1 [P,L]etc. (You don't "really" need proxying, unless you access another host of course.) This is from memory, didn't test it. I also think you may be able to save the remote address to a variable and do something with that in the "target" url.
Hope this helps. Best wishes, Nils --------------------------------------------------------------------- The official User-To-User support forum of the Apache HTTP Server Project. See <URL:http://httpd.apache.org/userslist.html> for more info. To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx " from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx