I've just finished the Getting started tutorial (http://book.cakephp.org/2.0/en/getting-started.html) and put my files on an Apache server, that has Drupal projet as root URL.
The Cakephp's index page loads fine, but when I click on any item, changing my root url to something like root/posts/view/2
, it displays Drupal's page not found error.
I guess it may be a rewrite problem. My CakePHP directory has an .htaccess file containing :
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteRule ^$ app/webroot/ [L]
RewriteRule (.*) app/webroot/$1 [L]
</IfModule>
And my apache2 sites-enabled conf ends with :
Alias /test /var/www/cakephp/app/webroot
<Directory /var/www/cakephp/>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>
</VirtualHost>
When I change the index action route from :
Router::connect('/', array('controller' => 'posts', 'action' => 'index'));
to :
Router::connect('/foo', array('controller' => 'posts', 'action' => 'index'));
I've got the same error as described above.
Any clue ?