httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gary Turner <>
Subject Re: [users@httpd] adding footers on basis of IP address.
Date Tue, 24 Dec 2002 10:26:22 GMT
Gaurav Pathak wrote:

>I have a list of IP Address with me. What I want is if my website is 
>viewed from any of these IP Addresses I want to add a particular line 
>of text (basically a footer) and then display it.
>For a range of IP address x.y.z.1 to x.y.z.255 I want one footer while 
>for another range p.q.r.1 to p.q.r.255 I want to have a different footer.
>Any hints on how can I achieve this.

The first thing that comes to my mind is to use server-side-includes and
conditional expressions.  Use the environmental variable "REMOTE_ADDR"
or "REMOTE_HOST".  You may prefer to use the ssi to call a cgi script to
handle the whatif.  See:

 If someone tells you---
 "I have a sense of humor, but that's not funny." 
                                  ---they don't.

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