Msg#: 4331394 posted 5:15 am on Jun 27, 2011 (gmt 0)
I control the website at URL#1. I do not control URL#X nor URL#Y. Both URL#X and URL#Y contain backlinks to URL#1. I want to redirect traffic that arrives from URL#X to URL#2. However, I do not want to redirect traffic that arrives from URL#Y to URL#2. Is this possible?
In other words, simply adding the following to .htaccess will redirect all traffic from URL#X and URL#Y to URL#2. This is not what I want. Redirect 301 URL#1 URL#2 Thank you for your help.
The RewriteCond is a Regular Expression so you only need to give enough information to make it unique. (I've got one that says in full \.(ua|su|mobi)/ for example. 100% of my referers from these extensions are forged.)
The RewriteRule only gives the end of the address, because you're kicking out people who request any page. Or, ahem, sending them to a place where you're certain they would be a lot happier. This includes people who just type in "www.example.com", because server magic has already changed that into a full address.
All this is assuming that URL#2 is waiting with open arms to receive your unwanted guests. Ahem. Oh, and I assumed that when you said URL you meant "domain". Otherwise you have to make the RewriteCond a little more detailed.
Msg#: 4331394 posted 8:55 pm on Jun 27, 2011 (gmt 0)
Hmm, not sure about what to do G1 and Lucy. When you wrote "ickysite/whose/visitors/youdon'twant" I got the idea that your regex will not do what I want: I do want visitors from URL#X and URL#Y at URL#1. I just don't want peeps from URL#Y to be redirected to URL#2 (as stated in the first para.) Not redirecting is a big difference from "kicking out people".
Please, please give the actual RewriteRule/RewriteCond example using the "URL#X" etc. examples, so that we stay on the same page. TIA!