I have some sites mysite1.com
, mysite2.com
,....mysiten.com
All mysite1-n.com
using external javascript on myexternalsite.com/mainfile.js
I want,
if (mysite1-n.com
) visitors come from www.google.com
then will redirect to welcome.com
if (mysite1-n.com
) visitors come from www.yahoo.com
then will redirect to welcome2.com
if (mysite1-n.com
) visitors come from www.anotherdomain.com
then will call javascript on myexternalsite.com/file1.js
and working using this script
And if (mysite1-n.com
) visitors come from bookmark then will call javascript on myexternalsite.com/file2.js
and working using this script
What sort of script should I be using on myexternalsite.com/mainfile.js
?
Thank's
basically you should check for document.referrer value and the document.location.href to do achieve what you want. This with a bunch of regexp should do the trick easily.
ex:
and so on