Well, you could do it with a small cgi script.
Just put the following code in index.cgi and upload it to your home directory. Make sure you don't have an index.html, index.shtml etc. or else it won't go to the index.cgi.
#!/usr/bin/perl
$referer = $ENV{'HTTP_REFERER'};
if ($referer =~ m/pageX.com/) { print "Location: y.html\n\n"; }
elsif ($referer =~ m/Z.com/) { print "Location: a.html\n\n"; }
else { print "Location: index1.html\n\n"; }
Visitor will get redirected to index1.html if he/she didn't come from either pageX.com or Z.com.
Hope this helps.
|