Where are all the references to the URL stored? I have my first craft website all working great on my local dev server and want to move it to the production server. I think I went about this the wrong way but I installed a fresh install of craft on the pro server then purchased a pro license.key. This all installed OK. This is the same root level structure as the local dev version.

I made sure both sites were upto date then copied over my database dump from dev and uploaded my templates. However this has broken the URLs (the home page loads). Have I missed something?

The production server doesn't have the domain pointing at it but can be view via the IP like so.

http://79.170.40.48/mydomain.co.uk/    &lt;-- though it does require the trailing lash

The odd bit is if I visit the link 

http://79.170.40.48/mydomain.co.uk/products

the browser address bar says 

http://79.170.40.48/mydomain.co.uk/products

the apache error says the requested URL is
/home/sites/mydomain.co.uk/public_html/index.php was not found on this server.

And curiously the /home/sites/ address is what my my local dev path is. So where is the remote product install getting this from?
Craft makes it easy to handle multiple environments, but you need to make it aware about the differences. Usually it's smart enough to enough to know the base folder path that you have it hosted in.

It's also smart enough to usually which url's you want. Sometimes it doesn't properly remove index.php from the URL, and that you can manually override with the setting omitScriptNameInUrls.

Since your public folder is named public_html, it's not clear from your question if you are running with the standard folder structure (index.php located in public folder, $craftPath inside index.php pointing to craft/ folder one level above public folder).

In general, you should have a look at the documentation regarding multi-environment configuration.

The one other area where it's usually necessary to set environment specific settings is Asset sources: Check out the chapter on that in the docs as well.