I have got a source code of a codeigniter project.in the config.php file there is a dot in the base url.
Code:
$config['base_url'] = 'http://codeigniter-ajaxcrud.local/';
what is the purpose of using this dot in the base url?
So actually they have created virtual host in local machine.
You also can create virtual host in your local machine, Please find below example so you can understand it in brief.
Open this file if you are using xampp, and add this line at the end of page.
c:\xampp\apache\conf\extra\httpd-vhosts.conf
<VirtualHost codeigniter-ajaxcrud.local:80>
DocumentRoot "C:/xampp/htdocs/codeigniter-ajaxcrud"
ServerName codeigniter-ajaxcrud.local
ServerAlias www.codeigniter-ajaxcrud.local
<Directory "c:/xampp/htdocs/codeigniter-ajaxcrud">
Options Indexes FollowSymLinks Includes ExecCGI
AllowOverride All
Require all Granted
</Directory>
</VirtualHost>
Once you done with this add codeigniter-ajaxcrud.local in hosts file. This file will be located in below location in windows.
Drivers/etc/host
add below line at end of the page.
127.0.0.1 codeigniter-ajaxcrud.local
Once you done with this please save all files and restart apache server. Than this host will work.