Ubuntu Codeigniter URL segements not working |
[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=...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.
[eluser]danmontgomery[/eluser]
Try http://127.0.0.2/fastconfig/index.php?/app
[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?
[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
[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.
[eluser]n0xie[/eluser]
I assume you are running fastcgi. In that case change your .htaccess to: Code: RewriteEngine on
[eluser]chuckleberry13[/eluser]
I'm not sure what the issue was but after a restart things are working. Thanks for all the help!
[eluser]Unknown[/eluser]
Thanks Ray. That helped me out. I recently moved from Windows 7 to Ubuntu. |
Welcome Guest, Not a member yet? Register Sign In |