0

I have two servers - this one does not require ^ and backslash in order to work. I want to redirect based on IP NAME not the IP number. The (fictitious) IP Name is 74.125.227.104.cust.wildblue.net

This works perfectly:

RewriteCond %{REMOTE_HOST} 74.125.227.104

RewriteRule .* http://www.newsite.com/ [R=301,L]

This is wrong - the name is what I wish to catch and redirect:

RewriteCond %{REMOTE_HOST} cust.wildblue.net

RewriteRule .* http://www.newsite.com/ [R=301,L]

Any help is VERY much appreciated! Thank you

-David Dolores

  • remote_host is the hostname of whoever's hitting your server, and would only be available if there's a reverse DNS mapping for their IP. Maybe you want `HTTP_HOST`, which'd be the hostname they're requesting. – Marc B Sep 25 '14 at 18:26
  • Thanks Marc, The ISP name has a boatload of different IPS (the first part of the "IP_NAME" entity in my tracker data) - My goal is to catch them all by using the common name string. If I use reverse DNS I still redirect based on individual IP right? tell me. I am not an expert on thyis subject. do you have any suggestion – David Dolores Sep 26 '14 at 18:42

0 Answers0