Re: content being served on the basis on incoming IP

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>  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]
>

Hmm, thats not exactly what i was thinking and I believe mod _rewrite
may not help here as that is a url rewriter and what I am after to
serv different content for the same domain based on incoming IP.

Ex.

person with ip 1.1.1.2 hits domain example.com and is getting a red
circle on the screen where content is being read off
/htdocs/www/content_for_user_1

person with ip 1.1.1.3 hits domain example.com and is getting a red
circle on the screen where content is being read off
/htdocs/www/content_for_user_2 .

I suppose it should do something to do with virtual hosts. problem
would be sorted by assigning many IP to the same interface
(subinterface) but I cannot use this option. Single IP has to serve
different content for different user based on their IP.

is it possible at all ? I do expect problems with SSL but for the
satrters wanted to sort out http.

Cheers. Simon

---------------------------------------------------------------------
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


[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux