Hello guys!

I want to keep the referal information in a session in my site but don't want to loose it everytime the visitor returns to my homepage from an internal page.

What I mean is, I have this in my index.php:

PHP Code:
header("Cache-control: private"); 
$visref $HTTP_REFERER;
$_SESSION['visref'] = $visref
This way I will be able to know what page the user came from when he contact me. But the problem is that if he goes to my portfolio page and then goes back to my Home page the Session is registed with the interal page and not the actual referal site.

How can I do this?