cakephp: configuring cakephp on shared host justhost

老子叫甜甜 提交于 2019-12-08 13:04:06

问题


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 webrootdirectory (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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!