CakePHP: URL rewriting is not properly configured on your server

When I try to run my project (made with cakephp framework), I receive this error:

URL rewriting is not properly configured on your server. Help me configure it I don't / can't use URL rewriting

I checked apache httpd.conf file and everything look ok. How can I fix this?



Work through the steps in the cookbook for setting up "Apache and mod_rewrite (and .htaccess)" (1.x/2.x/3.x) to make sure you haven't missed anything. (If that fails, we will need more information.)

Ugh. Before you go nuts testing out your Apache config, make sure cake.generic.css is available in your app/webroot/css/ folder. This is a very misleading error message.

The state of URL rewriting is being checked indirectly by checking for access to cake.generic.css (which would only be found if url rewriting is working).

The red error box in the default home.ctp is ALWAYS shown by default. Then the styling in cake.generic.css will hide it via

#url-rewriting-warning {

But that means if the cake.generic.css file is not found (e.g. because you deleted it to use your own CSS), the error box will not be hidden, even though URL rewriting is working perfectly fine.

So basically, ignore the URL rewriting error on the default homepage. Try to access one of your controller+views and see if it works.

I just got the same problem. The cause was the database config. I solved it by changing this in the database.php file:


    public $default = array(
        'datasource' => 'Database/Mysql',...

to this (rockies, please don't copy the '...' part):


     public $default = array(
         'driver' => 'mysql',...

Note: I am working on old cakephp 1.3.10

I had the same problem, having all server configured. I've finally found this discussion. My problem appeared when I created a default.ctp in app/layouts with some errors. I was calling:

echo $this->element('fancybox_links');

when that element wasn't ready and solved it by creating that element. So if you have this problem and your httpd.conf seems to be right, check for another cause.

I have experienced similar issues when there was a problem with DB connectivity or extension loading (MSSQL on Windows). It is very likely not a URL rewriting issue. Since your phpmyadmin isn't working either check MySQL configuration.

Need Your Help

UICollectionView - resizing cells on device rotate - Swift

swift rotation resize uicollectionview

I've created a UICollectionView, so that I can arrange views into neat columns. I'd like there to be a single column on devices > 500 pixels wide.

Where to set the OAuth redirect_uri in ASP.NET 4.5 webforms application

c# .net webforms oauth-2.0

I can't find anywhere how to set the OAuth2 redirect_uri in an ASP.NET 4.5 webforms application. By default it's set to localhost and of course I get this error from google: