Magento redirecting to old URL after duplicating site
===

I'm struggling with a Magento multi store install. The old setup was one Magento install with two sites / stores all pointing to the same folder. Now the client wants 2 independent websites so changes to one won't mess the other. 

Anyway, the database was duplicated, the files were copied, var/cache, var/session, var/tmp were emptied. I've changed the database params in app/etc/local.xml, the .htaccess file doesn't have any hard coded rules. 

The problem is that sitea.com keeps redirecting to siteb.com and the admin area is not working, so I have to do everything in the console or phpMyAdmin. 

What are the database tables where I have to do the changes ? What am I missing ?