From owner-freebsd-questions Mon Aug 20 10:33:59 2001 Delivered-To: freebsd-questions@freebsd.org Received: from nebula.anchoragerescue.org (cable-115-7-237-24.anchorageak.net [24.237.7.115]) by hub.freebsd.org (Postfix) with ESMTP id CB34E37B410 for ; Mon, 20 Aug 2001 10:33:53 -0700 (PDT) (envelope-from akbeech@anchoragerescue.org) Received: from there (galaxy.anchoragerescue.org [24.237.7.95]) by nebula.anchoragerescue.org (Postfix) with SMTP id ABF37145; Mon, 20 Aug 2001 09:33:52 -0800 (AKDT) Content-Type: text/plain; charset="iso-8859-1" From: Beech Rintoul To: "Mark Hughes" Subject: Re: Apache question Date: Mon, 20 Aug 2001 09:33:52 -0800 X-Mailer: KMail [version 1.3] References: <20010819195215.C285CD3@nebula.anchoragerescue.org> <20010820035919.DB399D3@nebula.anchoragerescue.org> <035001c12967$4dc549f0$e4a5fea9@mark2> In-Reply-To: <035001c12967$4dc549f0$e4a5fea9@mark2> Cc: freebsd-questions@freebsd.org MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Message-Id: <20010820173352.ABF37145@nebula.anchoragerescue.org> Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Monday 20 August 2001 03:00 am, you wrote: > > On Sunday 19 August 2001 05:08 pm, you wrote: > > > With PHP you can put something like this: > > > > > > > > if ($test=strstr($HTTP_REFERER,"http://www.example.com/")) { > > > header("Location: target_url"); > > > } > > > ?> > > > > I tried that, but it doesn't work. Am I doing something wrong? > > > > > if ($test=strstr($HTTP_REFERER,"http://www.alaskadesign.com/")) { > > header("Location: http://www.anchoragerescue.org/redirect.html"); > > } > > ?> > > > > What does happen? That looks syntactically correct....for testing, do a > "print $HTTP_REFERER" to check the variable is being set and what it is > being set to - it maybe the case that you have the option to set all > environment thingies (technical, moi?) into variables is turned off in your > php.ini (think it may be called track vars, the option, but I could be > wrong), in which case you need something like > $HTTP_SERVER_VARS["HTTP_REFERER"] in place of $HTTP_REFERER. > > Hope this helps, > Mark > Ok. I tried "print $HTTP_REFERER" and it returns nothing. Just to test I ran the "Hello World" php test script and it's working ok. I'm open to suggestions, but it seems I'm on the right track as the php logger gets that information. Beech -- Micro$oft: "Where can we make you go today?" ------------------------------------------------------------------- Beech Rintoul - IT Manager - Instructor - akbeech@anchoragerescue.org /"\ ASCII Ribbon Campaign | Anchorage Gospel Rescue Mission \ / - NO HTML/RTF in e-mail | P.O. Box 230510 X - NO Word docs in e-mail | Anchorage, AK 99523-0510 / \ ----------------------------------------------------------------- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message