You are here: Re: What is it called ??? « All PHP « IT news, forums, messages
Re: What is it called ???

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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация