httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nils Jeppe <>
Subject Re: [users@httpd] content being served on the basis on incoming IP
Date Thu, 13 Mar 2008 11:14:08 GMT

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 

RewriteCond %{REMOTE_ADDR}	[NC]
RewriteRule ^/(.*)$1 
RewriteCond %{REMOTE_ADDR}        [NC]
RewriteRule ^/(.*)    $1

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,

The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message