|
Posted by petersprc on 11/16/06 02:48
Hi,
You can do this by checking the referrer. For example:
<?
// Replace my.site with your site
function checkReferrer()
{
if (isset($_SERVER['HTTP_REFERER']) && preg_match(
'#^https?://my.site(/|$)#i', $_SERVER['HTTP_REFERER'])) {
return true;
}
header('Location: /');
}
checkReferrer();
?>
Ulle wrote:
> Hi All
>
> Im looking for a way to redirect people to the main page when they are using
> a bookmark to lets say a forum or just type the adress in...
>
> Exapmle : If you choose to go to the forum at once then your gonna be
> redirected to the main page and then enter the forum from there....
>
> I know there is a function there can do that, its seen most with add's, but
> the function should be the same, just the main page instead of the add's...
>
> So i would be happy if sommeone could tell me what that function is
> called...
>
> --
> Best Regards
> Ulrik Martinsson
Navigation:
[Reply to this message]
|