This will depend on the apache configuration on your server.
From my POV, it is better to have a structure like:
public_html/ codeigniter/ application/ system/ [...]/
Then make your apache configuration item in this folder with something like:
<VirtualHost *:80> DocumentRoot "path_to_the_folder/codeigniter" ServerName yourDomain.loc ServerAlias www.yourDomain.loc <Directory path_to_the_folder/codeigniter/ >
and your /etc/hosts file looks like this:
127.0.0.1 yourDomain.loc 127.0.0.1 www.yourDomain.loc
source share