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.
1 comments:
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