![]() |
trouble with my controllers (basic stuff) - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21) +--- Thread: trouble with my controllers (basic stuff) (/showthread.php?tid=20508) |
trouble with my controllers (basic stuff) - El Forum - 07-12-2009 [eluser]nemanjanq[/eluser] Hi, I have problem, with my controllers routing. I have setup this: config.php Code: $config['base_url'] = "http://localhost/project/"; routes.php Code: $route['default_controller'] = "home"; and now ... when I type in http://localhost/project/ - WORKING goes to my home controller http://localhost/project/home - NOT WORKING ? http://localhost/project/home/index - NOT WORKING ? http://localhost/project/admin/ - NOT WORKING ? (I have admin controller) if I add index.php in links like http://localhost/stampar_dev/index.php/home/index - WORKING. I tryed http://ellislab.com/codeigniter/user-guide/general/urls.html to Removing the index.php file Code: RewriteEngine on when I do this all my links go back to http://localhost/ etc. my WAMP starting page. help. ![]() trouble with my controllers (basic stuff) - El Forum - 07-12-2009 [eluser]Dam1an[/eluser] You're making the rewrite to an absolute path (just the / so it started from the web root) change it to be Code: RewriteEngine on It should then do the rewrite relative to the directory it's in (same as index.php) trouble with my controllers (basic stuff) - El Forum - 07-12-2009 [eluser]nemanjanq[/eluser] Thanks! That little dot changed a lot. ![]() Now I have new problem. My css is not loading right. I have this in my views Code: <link type="text/css" rel="stylesheet" href="<?=base_url();?>assets/css/admin.css" /> and I get this out Code: <link type="text/css" rel="stylesheet" href="http://localhost/project/assets/css/admin.css" /> which looks fine assets is in my root folder, but when I click on Code: <link type="text/css" rel="stylesheet" href="http://localhost/project/assets/css/admin.css" /> I got 404 ? trouble with my controllers (basic stuff) - El Forum - 07-12-2009 [eluser]nemanjanq[/eluser] damm, ... I just add assets, and it works. I need to learn more about .htaccess ![]() Code: RewriteEngine on |