After research on cakephp tutorial, which come to setting cakephp on shared hosting and it will work :)
- move app, cake, plugins, vendors folder into your hosting root
folder. It is user root folder on your hosting
- delete .htaccess and index.php on cakephp root folder
- move /app/webroot/. to /public_html folder
- delete empty /app/webroot folder
- edit /public_html/index.php to point to the ‘cake’ and ‘app’
directories. For example my public_html path for my domain is
/home/username/public_html, so i point
- ROOT to look at /home/username
- APP_DIR to look at /home/username/app
- CAKE_CORE_INCLUDE_PATH to look at /home/username/cake
- edit this line on /public_html/index.php with your appropriate path
/**
* The actual directory name for the "app".
* Edited By Siraj
*/ if (!defined('APP_DIR')) { define('APP_DIR', basename(dirname(dirname(FILE))) . DS .'public_html' . DS .'app');
}
/// START --- Edited By Siraj
if (!defined('CAKE_CORE_INCLUDE_PATH')) { if
(function_exists('ini_set')) { ini_set('include_path', '/home' . DS .
'username' . DS . 'public_html' . DS . 'lib' . PATH_SEPARATOR .
ini_get('include_path')); //define('CAKE_CORE_INCLUDE_PATH', 'home' .
DS . 'username' . DS . 'public_html' . DS . 'lib'); } if (!include
('/home' . DS . 'username' . DS . 'public_html' . DS . 'lib' . DS
.'Cake' . DS . 'bootstrap.php')) { $failed = true; } } else { if
(!include ('/home' . DS . 'username' . DS . 'public_html' . DS . 'lib'
. DS . 'Cake' . DS . 'bootstrap.php')) { $failed = true; } }
//// END
- The only .htaccess i have on /home/username/public_html, the setting
for .htaccess look like this
RewriteEngine On RewriteCond
%{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php?url=$1 [QSA,L]