httpd-users mailing list archives

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

>Hi
>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.
>eg
>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:

	http://httpd.apache.org/docs/howto/ssi.html#conditionalexpressions

hth
--
gt                  kk5st@sbcglobal.net
 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:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message