How did i fixed my CakePHP application at Freehostia

Last night i was having problem running my CakePHP application at Freehostia particularly the 500 Internal Server error.

If someone have experienced the same error like what I had. Here's how I corrected it.

Add "/" to your .htaccess file located at /www/cakephp/

From:

RewriteEngine on
RewriteRule ^$ app/webroot/ [L]
RewriteRule (.*) app/webroot/$1 [L]


to:


RewriteEngine on
RewriteRule ^$ /app/webroot/ [L]
RewriteRule (.*) /app/webroot/$1 [L]


Now to your .htaccess located at www/cakephp/app

From:


RewriteEngine on
RewriteRule ^$ webroot/ [L]
RewriteRule (.*) webroot/$1 [L]


to:


RewriteEngine on
RewriteRule ^$ /webroot/ [L]
RewriteRule (.*) /webroot/$1 [L]


Lastly, your .htaccess file at www/cakephp/app/webroot

from:


RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php?url=$1 [QSA,L]


to:


RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php?url=$1 [QSA,L]


By adding "/" to your .htaccess files your CakePHP application will work now automagically. Hope that helps.
Share and Enjoy!
Digg Stumble This Del.icio.us Mixx Furl Propeller Simpy Live Twitthis Add To Slashdot Spurl Google Yahoo Reddit Technorati Blinklist Blogmarks Smarkings Ma.gnolia SphereIt Sphinn Feedmelinks .

Comments

One response to “How did i fixed my CakePHP application at Freehostia”

Kaustav said...
July 15, 2010 at 10:39 AM

Hi,
Thanks for the idea. I was developing an app in CakePHP but I was unsure whether it will work on Freehostia. Thanks to your post, i'll proceed with my app and let you know if it works.

Kaustav.

Post a Comment

Thank you for commenting into this post. I will have it published if it isn't spam