is to follow the below tutorial.
You need root and 2 apps : Galaxy Ace Unlock and Busybox Installer (if you don't have busybox)
After you install a version of BusyBox you can run Galaxy Ace Unlock. Now you have 2 options : "See Sim Unlock Code" and "Donate". Select See Sim Unlock Code and wait. If you have blackscreen for 60 seconds, it's normal. After the app give you some codes. Note them somewhere. Now when you put a another network sim require a code try codes.
I tested on Galaxy Mini s5570 and Galaxy Ace s5830 and work. You can try it on other phones. I'm not responsible for damage your phone.