Web Hosting Talk







View Full Version : .htaccess referrer redirect


blazenet
05-13-2002, 08:55 AM
Hello,

I am wondering how to set up a .htaccess file correct to redirect a visitor to / , when the referrer is not, in my case, www.antrophia.com ...

Does anyone know? I just can't find any good solutions for that online, and I just spent about 2 hours trying and finding out but it just doesn't work...

Thanks in advance,

Leon Mergen

webx
05-13-2002, 01:28 PM
I don't have the tip handy, but you need to use mod_rewrite. Search the forum and you'll find plenty of ready-made .htaccess files for this purpose.

anantan
05-15-2002, 01:20 PM
in .htaccess file just write below line



ErrorDocument 404 /cgi-bin/redirect.cgi



in redirection .cgi
you just put

print "Location: http:www.whateverurl.com";


I hope it should work, if you have problem with it jsut
mail me.

hope to enjoy.

Ananthan

anantan
05-15-2002, 01:57 PM
If I understand your questions correctly

In Java script you can look at domain property and then
you can easly forward it.


-Anantan