CAKEPHP
Como eu faço para funcionar meu projeto em cakephp na minha hospedagem do Hostgator.
tem alguma configuração no hostgator que tenho que fazer?
-
Fala Olavo beleza?
Basicamente o mais recomendável nesse caso é consultar a documentação referente aos requerimentos da versão do Cake que está utilizando você pode consulta-la aqui e comparar com as especificações de seu plano, caso utilize um plano compartilhado você pode acessar as especificações aqui.
Ações de comentário -
So after research on cakephp tutorial, which come to setting cakephp on shared hosting and i think this solution also good for production phase. I will mention how i set my cakephp on hostgator
- 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/myhost/public_html, so i point
– ROOT to look at /home/myhost
– APP_DIR to look at /home/myhost/app
– CAKE_CORE_INCLUDE_PATH to look at /home/myhost/cake - edit this line on /public_html/index.php with your appropriate path
if (!defined('ROOT')) {
define('ROOT', DS.'home'.DS.'myhost');
}if (!defined('APP_DIR')) {
define('APP_DIR', 'app');
}if (!defined('CAKE_CORE_INCLUDE_PATH')) {
define('CAKE_CORE_INCLUDE_PATH', DS.'home'.DS.'myhost');
} - The only .htaccess i have on /home/myhost/public_html, the setting for .htaccess look like this
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php?url=$1 [QSA,L]
</IfModule>
Por favor, entrar para comentar.
4 comentários