From owner-freebsd-questions Tue Jan 5 19:56:58 1999 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id TAA06273 for freebsd-questions-outgoing; Tue, 5 Jan 1999 19:56:58 -0800 (PST) (envelope-from owner-freebsd-questions@FreeBSD.ORG) Received: from heather.greatbasin.com (heather.greatbasin.net [207.228.35.41]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id TAA06267 for ; Tue, 5 Jan 1999 19:56:55 -0800 (PST) (envelope-from dan@jgl.reno.nv.us) Received: from danco (rno-max2-07.gbis.net [207.228.60.135]) by heather.greatbasin.com (8.9.1a/8.8.8) with SMTP id TAA28629; Tue, 5 Jan 1999 19:56:17 -0800 (PST) Message-ID: <004101be3928$6e508b80$873ce4cf@danco.home> From: "Dan O'Connor" To: "Robert" , Subject: Re: apache + counter Date: Tue, 5 Jan 1999 19:55:32 -0800 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 4.72.3155.0 X-MIMEOLE: Produced By Microsoft MimeOLE V4.72.3155.0 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Robert wrote: >Hi. > >I installed a simple counter on my server's main website. > >It does a server side include to read a number from a file everytime the >page is accessed, and then increments the number. > > >However, I am trying to figure out how I can make apache not process this >particular include, possibly not even parse the file at all if neccessary, >if the hit is coming from my own server. > If your SSI script is in perl, you can make a wrapper like this: #!/usr/bin/perl -w if ($ENV{REMOTE_ADDR} ne 'xxx.xxx.xxx.xxx') # # Put the rest of the counter code in here. # } Obviously, you'll want to substitute your static IP address for xxx.xxx.xxx.xxx. Since this isn't really a FreeBSD-related question, you'll probably find more helpful info about CGI/SSI on the comp.infosystems.www.authoring.cgi newsgroup. Good luck, --Dan To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message