Ubuntu Codeigniter URL segements not working - 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: Ubuntu Codeigniter URL segements not working (/showthread.php?tid=37724) |
Ubuntu Codeigniter URL segements not working - El Forum - 01-18-2011 [eluser]chuckleberry13[/eluser] I've just installed apache2 and php5 on ubuntu and things are working great except that I can't get the segmented URLs to work. If I enable the get string I can access different controllers and methods but I would rather not use the GET string. Anybody have any ideas? This url works: http://127.0.0.2/fastconfig/index.php This url works: http://127.0.0.2/fastconfig/index.php?c=app&m=getClients (with GET enabled) This url does not work:http://127.0.0.2/fastconfig/index.php/app/ (note app is the default controller). I am not getting the Codeigniter 404 but rather the apache 404 page not found error. The apache error log says Code: [error] [client 127.0.0.2] File does not exist: /var/www/fastconfig/index.php/app Here is my Virtual Hosts (/etc/apache2/sites-available/default) Code: <VirtualHost *:80> Any help would be appreciated. Ubuntu Codeigniter URL segements not working - El Forum - 01-18-2011 [eluser]danmontgomery[/eluser] Try http://127.0.0.2/fastconfig/index.php?/app Ubuntu Codeigniter URL segements not working - El Forum - 01-18-2011 [eluser]chuckleberry13[/eluser] Yeah that works, but I feel like I should be able to do it without invoking the get string using ? ya know. That might be a decent temp workaround though. Any ideas on what could causing it? Ubuntu Codeigniter URL segements not working - El Forum - 01-28-2011 [eluser]idealws[/eluser] Have you tried adding this to your .htaccess file: Code: DirectoryIndex index.php Then removing the index.php from your config file to look like this? Code: $config['index_page'] = ''; Then add the following to your config.php file: Code: // $config['base_url'] = ''; So your config.php file should look like this at the top: Code: /* This is how I have mine setup and you will be able to access your site as: http://127.0.0.2/fastconfig/app/ Hope this helps. Regards, Ray Ubuntu Codeigniter URL segements not working - El Forum - 01-28-2011 [eluser]Unknown[/eluser] If I remember correctly, mod_rewrite is not enabled by default on Ubuntu's Apache. Check for a symlink to /etc/apache2/mods-available/rewrite.load in /etc/apache2/mods-enabled. Ubuntu Codeigniter URL segements not working - El Forum - 01-30-2011 [eluser]n0xie[/eluser] I assume you are running fastcgi. In that case change your .htaccess to: Code: RewriteEngine on Ubuntu Codeigniter URL segements not working - El Forum - 01-30-2011 [eluser]chuckleberry13[/eluser] I'm not sure what the issue was but after a restart things are working. Thanks for all the help! Ubuntu Codeigniter URL segements not working - El Forum - 02-05-2011 [eluser]Unknown[/eluser] Thanks Ray. That helped me out. I recently moved from Windows 7 to Ubuntu. |