is it possible to change the domain name of a hosting package?

basically: I set up the site under domain1.com but Ive now been asked to change the domain name to domain2.com.

I parked domain2.com and now you can access the site via both domain names which is fine but any relative urls within the site still show as domain1.com/whatever.... so after a couple of clicks the address bar is back to displaying domain2.com

is there a way where I can get domain2.com to show in the address bar and relative urls instead?