Welcome Guest, Not a member yet? Register   Sign In
Issue with links

I have all the links working properly on my localhost. but when access my application through LAN, the links do not seem to work. I think this has to do with either the base_url or uri_protocol in the config files.
heres how i have set them in my config file.

$config['base_url'] = "http://localhost/codeigniter";

$config['uri_protocol'] = "AUTO";

any suggestions plz!

localhost refers to the current computer
so each user on the network would be trying to access the files off their own computer
you might be able to replace localhost with your IP address depending on the config of your webserver

but doing so, whenever i have to change the machine, i have to change the ip address. isnt there a better way around?

it is not clear why you have to change the machine

if you have the server that has the webserver and CI code on it, then you need that to have a fully qualified domain name, or a static ip address. this is an intrisic part of how the internet and networking works

so if you are running the webserver on your pc and its ip address is, then change the config so that you access the site using

Then all the users on the network will be able to see the site successfully because i assume your IP will not change.
If your ip address is not static then you need to find a way to make it static

I use
$config['base_url']= "http://" .$_SERVER['SERVER_NAME'] ."/";

in these cases

Theme © iAndrew 2016 - Forum software by © MyBB