Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 20 Aug 2001 09:33:52 -0800
From:      Beech Rintoul <akbeech@anchoragerescue.org>
To:        "Mark Hughes" <mark@dvdnews.co.uk>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: Apache question
Message-ID:  <20010820173352.ABF37145@nebula.anchoragerescue.org>
In-Reply-To: <035001c12967$4dc549f0$e4a5fea9@mark2>
References:  <20010819195215.C285CD3@nebula.anchoragerescue.org> <20010820035919.DB399D3@nebula.anchoragerescue.org> <035001c12967$4dc549f0$e4a5fea9@mark2>

next in thread | previous in thread | raw e-mail | index | archive | help
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:
> > >
> > > <?php
> > > 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?
> >
> > <?php
> > if ($test=strstr($HTTP_REFERER,"http://www.alaskadesign.com/")) {
> > header("Location: http://www.anchoragerescue.org/redirect.html");
> > }
> > ?>
> > <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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010820173352.ABF37145>