CakePHP — Fixing Mod Rewrite Issue in Ubuntu

Here we are going to take about how to fix ” Fixing Mod Rewrite Issue” in CakePHP. I’m sure if you have(tried) installed CakePHP in Ubuntu, you definitely would have seen this message.

” URL rewriting is not properly configured on your server.”

And the darn page opens without any css and no URL rewriting (ofcourse, duh!)

Just follow the below checklist, I’m sure you might have missed any one of’em(like i did now ^^”)

Following are the Checklist for Fixing Mod Rewrite Issue

1. Verify all three .htaccess. (yep, three!)

~/projects/cakephp/.htaccess

~/projects/cakephp/app/.htaccess

~/projects/cakephp/app/webroot/.htaccess

(Important: If you have tried unzip the content of CakePHP source, somehow, .htaccess in ~/projects/cakephp/ got left out… damn!!!)

2. Enable mod rewrite ofcourse! (just double check it :P)

3. Proper permission for /tmp and /webroot

4. Enable “AllowOverride” in Apache

5. Check for `cake.generic.css’ (Seriously, crazy fix!!!)

CakePHP guys showing the URL rewriting issue if the css is not present. sheessh!!! (pss: I’m using CakePHP 1.3, my favorite!!!)

Well,  Thats it for Fixing Mod Rewrite Issue!!!! I’m sure one em will help you fellas or else you will ended up spending hours scratching your head!! xD