2011-09-23 3 views
0

localhost에서 작동하는 cakePHP의 일부 프로젝트가 있지만 인터넷에 배치했을 때 작동하지 않습니다 ... .htaccess와 함께 문제가 발생했습니다. 도와주세요. 내 htaccess로cakePHP - 프로젝트가 로컬 호스트에서 작동했지만 웹 사이트에 없었습니다.

<IfModule mod_rewrite.c> 
    RewriteEngine on 
    RewriteRule favicon\.ico$ favicon.ico [NC,L] 
    RewriteRule (img|css|js|files|stats)/(.*)$ $1/$2 [NC,L] 
    RewriteCond %{REQUEST_FILENAME} !-d 
    RewriteCond %{REQUEST_FILENAME} !-f 
    RewriteRule ^(.*)$ index.php?url=$1 [QSA,L] 
</IfModule> 
+2

"작동하지 않음"을 정의하십시오. – deceze

답변

0

의 미리 감사드립니다

내용 나는이 공유 호스팅 환경을 가정합니다. .htaccess를 다시 작성하지 않고 배포하고 이 작동하는지 확인하는 것이 좋습니다.. app/config/core.php에서 구성을 찾을 수 있습니다.

/** 
* To configure CakePHP *not* to use mod_rewrite and to 
* use CakePHP pretty URLs, remove these .htaccess 
* files: 
* 
* /.htaccess 
* /app/.htaccess 
* /app/webroot/.htaccess 
* 
* And uncomment the App.baseUrl below: 
*/ 
Configure::write('App.baseUrl', env('SCRIPT_NAME')); 
관련 문제