Redirection according to IP

Redirection according to IP

Post by Jesmond Navarr » Tue, 08 Jul 1997 04:00:00



I am using Apache web server under Linux Redhat Ver 2. I need to
redirect my visitors according to their ip.

Eg:

194.20.152.2 up to 194.20.152.20 -> index.html
194.20.152.21 up to 194.21.152.60 ->index2.html

Can that be done?


 
 
 

Redirection according to IP

Post by Ralf S. Engelscha » Thu, 10 Jul 1997 04:00:00



Quote:> I am using Apache web server under Linux Redhat Ver 2. I need to
> redirect my visitors according to their ip.
> Eg:
> 194.20.152.2 up to 194.20.152.20 -> index.html
> 194.20.152.21 up to 194.21.152.60 ->index2.html

Perhaps via the following mod_rewrite ruleset in your .htaccess file:

   Rewri*gine on
   RewriteCond   %{REMOTE_ADDR}   ^.+\.[2-9]$  [OR]
   RewriteCond   %{REMOTE_ADDR}   ^.+\.1[0-9]$ [OR]
   RewriteCond   %{REMOTE_ADDR}   ^.+\.20$
   RewriteRule   ^$   index.html   [L]
   RewriteRule   ^$   index2.html

Greetings,
                                       Ralf S. Engelschall

                                       www.engelschall.com

 
 
 

1. According to redirection of stdin

*** post for FREE via your newsreader at post.newsfeed.com ***

What I want is only to redirect the standard input device no matter in what
language.

The example can be the following :

#include <stdio.h>

1     int main( )
2     {
3         char s[100];
4         scanf( "%s" , s );
5         printf( "%s\n" , s );
6         scanf( "%s" , s );
7         return 0;
8     }

When the program run to line 4 and line 6, it will block until you give it a
input from the stdin.

Now I want to give the input from another device instead of stdin , such as
file, pipe, and so on.

How can I do that ?

Thanks.

 -----= Posted via Newsfeed.Com, Uncensored Usenet News =-----
http://www.newsfeed.com - The #1 Newsgroup Service in the World!
-----== 90,000 Groups! - 17 Servers! - Unlimited Download! =-----

2. Extracting a line from several ones

3. Route IP masqueraded packets according to their source IP?

4. Network configuration

5. PLS-Major Problem in LAN (natd, IP alias, Port and IP redirections)

6. C++ function xref

7. allocate IP address according to client options

8. Unix - Frequently Asked Questions (Contents) [Frequent posting]

9. dhcpd fails to assign IP according to range for win98 client

10. Can I restrict access according to hostname or IP address?

11. implementation of redirection and redirection error handling

12. TCP/IP Port Redirection

13. Address Redirection and IP aliasing issues