View Full Version : .htaccess question.
Im trying to find a reffer based redirect code so when visitors come from yahoo and other search engines they are redirected to the warning pages instead of coming thru right to my main page.
I found this but not exactly sure how to use.
http://www.engelschall.com/pw/apache/rewriteguide/#ToC42
thanks for any help.
Muff
shane
02-12-2001, 11:48 AM
niot sure if it can be done with htaccess, try some JS
<SCRIPT LANGUAGE="JavaScript">
<!--
if (document.referrer.indexOf('yahoo.com') > -1)
location.href = 'http://teenagejuice.com';
if (document.referrer.indexOf('google.com') > -1)
location.href = 'http://teenagejuice.com';
if (document.referrer.indexOf('netscape.com') > -1)
location.href = 'http://teenagejuice.com';
if (document.referrer.indexOf('aol.com') > -1)
location.href = 'http://teenagejuice.com';
if (document.referrer.indexOf('altavista.com') > -1)
location.href = 'http://teenagejuice.com';
if (document.referrer.indexOf('northernlight.com') > -1)
location.href = 'http://teenagejuice.com';
if (document.referrer.indexOf('metacrawler.com') > -1)
location.href = 'http://teenagejuice.com';
if (document.referrer.indexOf('excite.com') > -1)
location.href = 'http://teenagejuice.com';
//-->
</SCRIPT>
Thanks shane ill try it but im not sending to teenagejuice http://bbs.adultwebmasterinfo.com/ubb/biggrin.gif
Muff
Shane will it make a difference if I put www. infornt or is it fine for the way it is?
thanks
Muff
Thanks Shane worked Like a charm, all my newbie yahoo and friends surfers are get the royal pitch. well sorta!
Muff
vBulletin® v3.7.3, Copyright ©2000-2012, Jelsoft Enterprises Ltd.