views:

465

answers:

2

I just set up a database according to CakePHP's conventions, ran the "bake" scripts for models, controllers and views, and made sure the path was set up correctly.

When I go to the following style of URL:

http://BASEURL/app/controller_name

I get the expected list view for that controller, but all the links generated by baked pages are in the format I expect to see:

http://BASEURL/controller_name

which gives me a 404. Interestingly enough, this:

http://BASEURL/app/

gives me:

Missing Method in AppController
Error: The action index is not defined in controller AppController
Error: Create AppController::index() in file: app/controllers/app_controller.php.

but this:

http://BASEURL/

gives me the default index page.

Here's my .htaccess:

<IfModule mod_rewrite.c>
    RewriteEngine on
    RewriteRule    ^$    webroot/    [L]
    RewriteRule    (.*) webroot/$1    [L]
 </IfModule>

Everything else is just as created by default and the bake scripts. Can anyone help point me in the right direction?

Please let me know if there's ANYTHING I can clarify or show an example of.

+2  A: 

Make sure your virtualhost or doc-root points to the app folder, and not its parent.

Mike B
Thank you very, very much.
danieltalsky
+1  A: 

Looks like this guy had a similar problem, and the solution was in making the base directory something other than app.

http://groups.google.com/group/cake-php/msg/5fba6c41a505ed48?pli=1

Travis Leleu