Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 19 Aug 2001 19:59:19 -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:  <20010820035919.DB399D3@nebula.anchoragerescue.org>
In-Reply-To: <030401c12914$9c0fcb10$e4a5fea9@mark2>
References:  <20010819195215.C285CD3@nebula.anchoragerescue.org> <030401c12914$9c0fcb10$e4a5fea9@mark2>

next in thread | previous in thread | raw e-mail | index | archive | help
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:
>
> <?php
> 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?

<?php 
if ($test=strstr($HTTP_REFERER,"http://www.alaskadesign.com/")) {     
header("Location: http://www.anchoragerescue.org/redirect.html"); 
} 
?> 
<html> 

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?20010820035919.DB399D3>