enable gii, URL rewrites, connect to db