Music gets deleted when I sync my iPhone 4s? - 1

I have my itunes library on an external hard drive. Everything is good but when i plug in my iphone to sync, itunes loses the file locations and i take a look at my external hard drive and all my music is gone. Then I restart my computer and when i take another look at the hard drive all the music is there like nothing happened. I'd really appreciate if someone helped me out here.
iTunes 11.0.4

If you have backed up your iPhone with iTunes, you can directly restore with iTunes.
Here is the guide from Apple offical website:
Click the "File" menu and select "Devices" > "Restore from Back up".
Or
Open the iOS device's Summary tab. There are two ways to access this:
Click the device button in the upper right corner. (If viewing the iTunes Store, click the Library button in the upper right corner. The device button will then be visible.)
From any view in iTunes, click the "View" menu and select "Show Sidebar". Select your iOS device in iTunes under "Devices".
Click the "Restore Backup" button.
See details: http://support.apple.com/.../kb/HT1766

If you haven't had a time to back up before the deletion, or you just don't want to restore the whole iPhone with the backup file, here are the solutions: any-data-recovery.com
In this step-by-step guide, 3 methods to recover data on iPhone are introduced, including:
Recover directly from iPhone;
Recover under iPhone DFU mode;
Extract from iTunes backup.

Hope all these will give you some help.