PDA

View Full Version : .htaccess question.


Muff
02-12-2001, 08:09 AM
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

Muff
02-12-2001, 09:49 AM
.

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>

Muff
02-12-2001, 12:14 PM
Thanks shane ill try it but im not sending to teenagejuice http://bbs.adultwebmasterinfo.com/ubb/biggrin.gif

Muff

Muff
02-12-2001, 01:22 PM
Shane will it make a difference if I put www. infornt or is it fine for the way it is?

thanks

Muff

Muff
02-12-2001, 03:52 PM
Thanks Shane worked Like a charm, all my newbie yahoo and friends surfers are get the royal pitch. well sorta!

Muff