Welcome Guest, Not a member yet? Register   Sign In
base_url == http://[::1]
#1

Hi,
I have a problem since I remove the index.php in the URL of my codeigniter project with .htaccess.
In my config file : 
Code:
$config['base_url'] = '';
$config['index_page'] = '';
Now, when I want to call the base_url function ( 'blah') of codeigniter, it shows me :

http://::1/blah

all my references are broken.

nothing works  Angry

Thanks a lot for a solution
Reply
#2

You should set the value of 'base_url' to the hostname of the site you're working on. Leaving it blank will cause these errors as it attempts to find the host, but can't always on localhost.
Reply
#3

In my previous projects, i'd never set it up this base_url variable.
I don't know why, now, for this new project, i have troubles.

It mean i must have a config file for the server and one for localhost

Thanks for reply.


PS: Soz for my English. I'm french
Reply
#4

(This post was last modified: 03-02-2016, 11:44 AM by jlp.)

This was a change in CI3.0.3, described on the "upgrading" page:
http://www.codeigniter.com/user_guide/in...t=base_url
James Parry
Project Lead
Reply
#5

(03-02-2016, 10:59 AM)ma5t3r Wrote: It mean i must have a config file for the server and one for localhost
Not really. Default config file will have http://localhost base URL, and then you can create a separate config file for your server with a proper base URL: http://www.codeigniter.com/user_guide/li...vironments
Reply




Theme © iAndrew 2016 - Forum software by © MyBB