Issue with links |
[eluser]junaids[/eluser]
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!
[eluser]tonanbarbarian[/eluser]
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
[eluser]junaids[/eluser]
but doing so, whenever i have to change the machine, i have to change the ip address. isnt there a better way around?
[eluser]tonanbarbarian[/eluser]
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 10.0.0.10, then change the config so that you access the site using http://10.0.0.10/codeigniter 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
[eluser]tomcode[/eluser]
I use Code: $config['base_url']= "http://" .$_SERVER['SERVER_NAME'] ."/"; in these cases |
Welcome Guest, Not a member yet? Register Sign In |