Mod Rewrite in Codeigniter

I get a 404 whenever I do a localhost/Code/welcome I believe it should be rerouting to localhost/Code/index.php/welcome here's my apache httpd.conf <Directory /var/www/Code> IndexIgnore */* <IfModule mod_rewrite.c> RewriteEngine On RewriteCond %{REQUEST_URI}
!^(/index\.php|/img|/js|/css|/robots\.txt|/favicon\.ico)
RewriteRule ^(.*)$ /index.php/$1 [L] </IfModule> </Directory> how can I fix this?? -- Thanks and Regards, Erick Njenga Nyachwaya, M: +254-725-008-790 <http://www.facebook.com/ErickNjenga> <http://www.twitter.com/ErickNjenga>

Kindly check these two files, this setup worked for me. .htacces file <IfModule mod_rewrite.c> Options +FollowSymLinks RewriteEngine on # Redirects direct controller views to the right URL # Keep people out of codeigniter directory and Git/Mercurial data RedirectMatch 403 ^/(application\/cache|system).*$ RewriteRule modules/(.+)/controllers/(.+)\.php$ /index.php/$1/$2 [L,R=301] RewriteRule controllers/(.+)\.php$ /index.php/$1 [L,R=301] # Send request via index.php (again, not if its a real file or folder) RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d <IfModule mod_php5.c> RewriteRule ^(.*)$ index.php/$1 [L] </IfModule> <IfModule !mod_php5.c> RewriteRule ^(.*)$ index.php?/$1 [L] </IfModule> </IfModule> codeigniter/system/application/config/config.php /* |-------------------------------------------------------------------------- | Index File |-------------------------------------------------------------------------- | | Typically this will be your index.php file, unless you've renamed it to | something else. If you are using mod_rewrite to remove the page set this | variable so that it is blank. | */ $config['index_page'] = ""; On 4 November 2010 20:04, Erick Njenga <eriknjenga@gmail.com> wrote:
I get a 404 whenever I do a localhost/Code/welcome
I believe it should be rerouting to localhost/Code/index.php/welcome
here's my apache httpd.conf
<Directory /var/www/Code>
IndexIgnore */*
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_URI}
!^(/index\.php|/img|/js|/css|/robots\.txt|/favicon\.ico)
RewriteRule ^(.*)$ /index.php/$1 [L]
</IfModule>
</Directory>
how can I fix this?? --
Thanks and Regards, Erick Njenga Nyachwaya, M: +254-725-008-790
<http://www.facebook.com/ErickNjenga> <http://www.twitter.com/ErickNjenga>
_______________________________________________ Skunkworks mailing list Skunkworks@lists.my.co.ke http://lists.my.co.ke/cgi-bin/mailman/listinfo/skunkworks ------------ Skunkworks Rules http://my.co.ke/phpbb/viewtopic.php?f=24&t=94 ------------ Other services @ http://my.co.ke
-- mOgetutu | STOP! Before posting your questions, remember the WWW Golden rule: What did you try? What did you get? What did you expect to get? | Input -> Controller | Processing -> Model | Output -> View
participants (2)
-
Erick Njenga
-
Isaak Mogetutu