I'm not a specialist and don't provide you any help, but I think it would help the one who will help you, if you will explain here if google.com is set as homepage in your internet browser or not, and if this redirection is happen only with google.com or other sites too. If is your homepage, you should check if it was changed. Good luck!
Check your addons. Check your plugins. Check extensions. (If you are using firefox) Open firefox Tools-->Addons
My uncle had an addon called xxxtools. Whenever you go to a website via firefox it would download the website itself as .html, .cgi, .php, .xml file. I disabled the addon then deleted it, afterwards...his firefox was working fine.
If that doesn't work, you may need to run your anti spyware programs.