views:

100

answers:

3

For some reason in CI 2.0 the URLS do not work.

http://localhost/myapp/ - will open the default controller (bc it finds index.php)
http://localhost/myapp/index.php/home/ - will open the default controller 
http://localhost/myapp/home/ - will show path not found

I am not sure if this is a problem with 2.0 or a specific problem with my configuration.

I am running Apache 2 on Mac OS X Snow Leopard.

I looked for .htaccess solution, but couldn't find any for CI 2.0.

+1  A: 

.htaccess solutions for CodeIgniter 1.7 will also work for CodeIgniter 2.0. .htaccess is used to configure the Apache webserver, which is independent of CodeIgniter.

(The suggested configuration from the CodeIgniter manual should therefore work fine.)

Sean Vieira
Thanks for the help.
Ivo Sabev
+3  A: 

Do You have a rewrite rule in apache to handle codeigniter like this? see: http://codeigniter.com/wiki/mod_rewrite/

  • The first one by default will work (defaults to index.php)
  • seconds one will work because you pass it to index.php
  • third wont without the rewrite rule.
Ken Struys
Thanks for the help!
Ivo Sabev
+1  A: 

The real problem was that in Snow Leopard the actual Directory configuration usually located in /private/etc/apache2/httpd.conf is now located in /private/etc/apache2/users/[USERNAME].conf By default FollowSymlinks and AllowOverride are disabled there so you have to go and fix it manually, even if it is enabled in the regular httpd.conf

Tricky. Thanks everybody. Otherwise all you need is the regular .htaccess as people already pointed out.

Ivo Sabev