问题
I tried to configure cakephp on justhost for my addon domain and i'm getting 404 not found error when I go to www.merryflowers.com/pages/home
Can someone please help me out?
The following are the changes I made in /webroot/index.php and /webroot/test.php
if (!defined('ROOT')) {
define('ROOT', DS.'home'.DS.'xxx'.DS.'public_html');
}
if (!defined('APP_DIR')) {
define('APP_DIR', 'merryflowers');
}
if (!defined('CAKE_CORE_INCLUDE_PATH')) {
define('CAKE_CORE_INCLUDE_PATH', DS.'home'.DS.'xxx');
}
Do I need to make some changes to the .htaccess file? and .htaccess file from which folder?
under public_html/merryflowers.com/ i have: views, plugins and webroot folder
thank you
回答1:
It seems mod_rewrite
isn't functioning properly, I can access the webroot
directory (http://www.merryflowers.com/webroot/), which states that core.php
can't be found. Before you look into possible mod_rewrite
problems, ensure core.php
is properly included.
I'm not sure you need to set all the paths in index.php
, setting CAKE_CORE_INCLUDE_PATH
might be enough.
You're full path isn't DS.'home'.DS.'xxx'
, but:
DS.'home'.DS.'xxx'.'public_html'.DS.'merryflowers.com'
You might want to set ROOT
and APP_DIR
to the default values, unless you need custom paths.
来源:https://stackoverflow.com/questions/8906214/cakephp-configuring-cakephp-on-shared-host-justhost