![]() |
Newbie: base_url? - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: Newbie: base_url? (/showthread.php?tid=37879) |
Newbie: base_url? - El Forum - 01-23-2011 [eluser]ShawnMA[/eluser] I've searched the forums/web and have been able to find what I assume is a quick and easy answer to my question. I just started working thru the 2 video tutorials and hit a small snag. In tutorial 2 (blog), whenever I attempt to use scaffolding or the comment_insert function my pages always double up the URL so I always get a 404 error. For example: http://localhost/CodeIgniter/index.php/blog/blue/localhost/index.php/blog/blue/view I'm developing locally, and have my base_url setting to nothing (""). What do I need to config to ensure my pages always go to the correct location (and don't double up the url)? Thanks in advance for your time and assistance. Newbie: base_url? - El Forum - 01-23-2011 [eluser]John_Betong[/eluser] Try this, it works fine (for me) on both LOCALHOST and ONLINE ![]() ./config/config.php Code: $config['base_url'] = 'http://' .$_SERVER['SERVER_NAME'] .'/'; |