For example: I have mysite.com. I want anyone coming from xyz.com to be directed to mysite.com/index2.html, and everyone else to go to the usual mysite.com/index.html Is this possible? If so, how can it be accomplished? Thanks!
Check the request URI through .htaccess or through a server side script. e.g. RewriteCond {%HTTP_HOST} ^(www\.)?xyz.com RewriteRule .* http://mysite.com/$1 Code (markup):
Thanks krt. I tried creating an .htaccess file, but what I want is still not happening. Let me explain myself again to make sure I'm making sense: Say someone is on www.xyz.com looking at some page, and they click on a link to www.mysite.com I want that person to be redirected to www.mysite.com/dt/index.html So basically I think what I need is: any links coming from the xyz.com domain need to be redirected. My .htaccess file looks like this: RewriteEngine on RewriteCond {%HTTP_HOST} ^(www\.)?xyz.com RewriteRule .* http://mysite.com/dt/$1 Code (markup): Do I have it right? I've tried researching this in several places, but can't come up with a solution. Thanks again!
I think I may have just been unaware of the terminology. This seems more like what I need to do: RewriteEngine on RewriteCond %{HTTP_REFERER} ^http://(www\.)?xyz\.com [NC] RewriteRule (.*) http://mysite.com/dt/$1 [R=301,L] Code (markup): Does this seem correct? It's still not working. The link to mysite.com is actually on a page: subdomain.xyz.com if that makes a difference. Any help is much appreciated.
Can someone look at the code and tell me if it should work? At least that way I would know the problem is elsewere. Perhaps the ISP (1and1).