Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 5 Jan 1999 19:55:32 -0800
From:      "Dan O'Connor" <dan@jgl.reno.nv.us>
To:        "Robert" <robert@namodn.com>, <freebsd-questions@FreeBSD.ORG>
Subject:   Re: apache + counter
Message-ID:  <004101be3928$6e508b80$873ce4cf@danco.home>

next in thread | raw e-mail | index | archive | help
Robert <robert@namodn.com> 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.
>
<snip>
>
>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.

>
<snip>

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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?004101be3928$6e508b80$873ce4cf>