I am trying to rewrite http://www.domain to http://domain in a wordpress installation, but it looks like it\'s making the url loop from http://www to http:// and back to http://
WordPress can do this for you. Remove the .htaccess stuff you've added, and go to Options -> General and change your site's URL.