DNS (bind) : How to redirect an http request to a different domain, based on the requested domain

binddomain-name-systemPROXYrewrite

I host my own DNS server and would like to be able to redirect links from within the DNS server so that redirection is seamless.

Example: redirect all requests for www.yahoo.com to www.google.com. I'd like to rewrite the parameters as well.

IE: www.yahoo.com?search=asdf –> www.google.com?q=asdf

Is this better done through a proxy server? I want to minimize the amount of custom configuration that must be done at the router level and put all the logic into the my DNS (or proxy) server.

Thank you

Best Answer

This is not something you can do with DNS. If you host the domain you want to redirect then Apache+Mod-rewrite would be my suggestion, if not, then a Squid proxy would be how I'd tackle the problem.

Bart.