Thursday, March 1, 2012

How to make the routes working with CakePHP in a subdirectory

I have a little Webpage set up with a little CakePHP Webapp in it.
The CakePHP stuff is in a subdirectory and so I got my .htaccess like this:

    <IfModule mod_rewrite.c> 
      RewriteEngine on 
      RewriteRule ^test/subdirectory$ subdirectory/app/webroot
      RewriteRule ^test/subdirectory/(.*)$ subdirectory/app/webroot/$1
    </IfModule>

Now navigating to domain.com/subdirectory works, but for my route to login I only get a 404 =(

     Router::connect( '/login', array('controller' => 'users', 'action' => 'login'));

Could you please help me?

//edit: I just tried around a little bit, my other routes like domain.com/controller/action/id don't work either.

--
Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.
 
 
To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php

No comments: