[TYPO3-english] Condition for HTTP_REFERER

Jigal van Hemert jigal.van.hemert at typo3.org
Sun Mar 24 11:22:44 CET 2013


Hi,

On 24-3-2013 8:59, Morten Kjems wrote:
> [globalString = IENV:HTTP_REFERER = *somesite.com*]
[...]
> The visitors from somesite.com will now see the special welcome message.
> But when the visitors navigate away from the initial page and then come
> back though a link on my site, the condition is no longer valid and no
> message will be displayed.
>
> Is there away to store the initial external referer and create a
> condition based on that. Or are there other solutions.

The HTTP_REFERER is a header sent by the browser. Browsers aren't 
required to send them so you can't fully rely on this.

You could write an extension which compares the domain in the referrer 
with the domain in the requested URL. If they are different it could be 
stored in the session data. A userFunc could be used in conditions to 
check this stored referrer.

A small extension could indeed solve your problem.

-- 
Jigal van Hemert
TYPO3 CMS Core Team member

TYPO3 .... inspiring people to share!
Get involved: typo3.org


More information about the TYPO3-english mailing list