Have you used .htaccess
to remove the index.php? if not then you must append it like:
http://example.com/codeigniter/index.php/galeria/tg
else
http://example.com/codeigniter/galeria/tg
Here, galeria
being your Controller
and the first segment
and tg
your function
and the second segment
of the URI
.