cakephp url rewriting not properly configured
I'm encountering a problem with my cakephp app...
I'm using Cakephp 2.4.3 with XAMPP on MacOSX Mavericks and I'm getting the message : URL rewriting is not properly configured on your server. 1) Help me configure it 2) I don't / can't use URL rewriting
But I configured the sites according to the url rewriting tutorial...
I have a Virtualhost :
<VirtualHost 127.0.0.1> ServerName cake84.loc DocumentRoot "/Users/me/Sites/c84/cakephp" DirectoryIndex index.php <Directory "/Users/me/Sites/c84/cakephp"> AllowOverride All Allow from all </Directory> </VirtualHost>
with ref in hosts file : 127.0.0.1 cake84.loc
the .htaccess file is present and contains:
<IfModule mod_rewrite.c> RewriteEngine on RewriteRule ^$ app/webroot/ [L] RewriteRule (.*) app/webroot/$1 [L] </IfModule>
and I have the file /Application/XAMPP/etc/httpd.conf with the line : LoadModule rewrite_module modules/mod_rewrite.so uncommented...
Am I forgetting something ?!!
Notice that the same configuration was working a week ago but in the parent folder. The only change I've made was to move the whole site from : /Users/me/Sites/c84 to /Users/me/Sites/c84/cakephp and then changing the path of the virtualhost. (And for sure, restarted the apache...)
Well... Problem solved...
It seems that cakephp has problems to detect correctly if the rewrite url mode is enabled... The best way is to call an url that should be rewritten to test the url rewritting.
In my case, the url rewriting was correctly enabled although I got this message... But unfortunately, the url I called to test it, had a syntax error (typo...) that I missed and nothing was shown...
I am also on Mavericks. For me, I had to edit the file:
(Replace myusername.conf with the username on your computer.)
In this file, I had to change the lines:
Options Indexes MultiViews to Options Indexes MultiViews FollowSymLinks
AllowOverride None to AllowOverride All, and then restarting Apache, solved the problem.
Hope this helps anyone else Googling for a solution on Mavericks.