From owner-freebsd-questions Sun Aug 19 20:59:24 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 3447237B410 for ; Sun, 19 Aug 2001 20:59:21 -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 DB399D3; Sun, 19 Aug 2001 19:59:19 -0800 (AKDT) Content-Type: text/plain; charset="iso-8859-1" From: Beech Rintoul To: "Mark Hughes" Subject: Re: Apache question Date: Sun, 19 Aug 2001 19:59:19 -0800 X-Mailer: KMail [version 1.3] References: <20010819195215.C285CD3@nebula.anchoragerescue.org> <030401c12914$9c0fcb10$e4a5fea9@mark2> In-Reply-To: <030401c12914$9c0fcb10$e4a5fea9@mark2> Cc: freebsd-questions@freebsd.org MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Message-Id: <20010820035919.DB399D3@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 Sunday 19 August 2001 05:08 pm, you wrote: > > I would like to direct referrals from a specific site to a special page > > on > > > our server. Is there a way to do this? I am running the latest port of > > apache+mod_php. > > With PHP you can put something like this: > > if ($test=strstr($HTTP_REFERER,"http://www.example.com/")) { > header("Location: target_url"); > } > ?> > > ....at the start of the page being linked to (or all pages on your site if > you wish), which will put all visitors who linked from any page on > example.com to your page identified by target_url. This must come before > any output is sent to the browser in a HTML page (else you can no longer > send headers). target_url can be relative or absolute. > > It may also be possible through your native apache config, althoguh I don't > know how off the top of my head. > > Hope this helps, > Mark > I tried that, but it doesn't work. Am I doing something wrong? 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