Installation on Ubuntu, Apache 2


Just trying the classic hello world without luck so far : (

First, I create a Wadus controller class. Then when i go to the browser:


I get a 404 error. Please note that this is an error handled by CodeIgniter, not by Apache.

I think i've managed to enable mod_rewrite correctly. Doing this:

- Create a symbolic link to it:
sudo ln -s /etc/apache2/mods-available/rewrite.load /etc/apache2/mods-enabled/rewrite.load
- Updated AllowOverride directive. Open Apache 2 default config:
sudo gedit /etc/apache2/sites-available/default

And change AllowOverride value to "All"

I can see mod_rewrite loaded in phpinfo(), i've restarted Apache, i've tried this .htaccess in CodeIgniter folder (is here where it should go, right?):

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /zv3/

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]


<IfModule !mod_rewrite.c>
ErrorDocument 404 /index.php

My config file looks like this:

$config['base_url'] = "http://localhost/zv3/";

Also tried to modify uri_protocal to all possible values to no avail :|

Can anyone help me out, please? I saw a fancy CodeIgniter demo and want to give it a go!


[eluser]Pascal Kriete[/eluser]

Since you're using mod-rewrite to remove your index.php file, your url would be:


Also, make sure that the class name, file name, etc are spelled and capitalized correctly (I don't know how many times I've made this mistake)

And check that:

$config['index_page'] = "";

That was it. Just for coherence filename was "Wadus.php", changing it to "wadus.php" did the trick (plus enabling mod_rewrite in Apache, i assume).

Docs should be updated to warn this clearly. Specially this page:

which reads:

Quote:CodeIgniter would attempt to find a controller named blog.php and load it

It's true, but it should say something about filename case-sensitivity.

Thanks very much and i at least hope the research about mod_rewrite helps anyone else.


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.