How To Make Gii Run From Backend Only?

Hi,

In frontend main.php I had disabled the gii settings, and enabled on the backend main file, gii still runs from front end !

How to do this, security wise this should not be allowed.

THX