I called base_url() in the form action in a view in my local machine. But, it is giving the url as http://::1/codeigniter/ instead of http://localhost/codeigniter. This is the same case with the site_url() also.
Is it a problem with the .htaccess file or should I make any settings in config.php?
Below is my .htaccess file:
DirectoryIndex index.php
RewriteEngine on
RewriteCond $1 !^(index\.php|(.*)\.swf|forums|images|css|downloads|jquery|js|robots\.txt|favicon\.ico)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ ./index.php?$1 [L,QSA]
I am using CodeIgniter 3.0 version.
$config['base_url']in config?$config['base_url'] = 'http://localhost/codeigniter'. Set this in your config and check if it working!