2011-11-02 5 views
0

로컬 컴퓨터에 htaccess가 켜져있는 가상 호스트가 있습니다. 문제는 내가 htaccess 파일을 페이지에 표시하는 대신 다운로드하는 경우입니다. 여기 내 유령이야.htaccess 관련 문제

<VirtualHost 127.0.0.1:80> 
    DocumentRoot "/Library/WebServer/Documents/test 
    <Directory "/Library/WebServer/Documents/test"> 
    AllowOverride All 
    </Directory> 
    ServerName local.test.com 
</VirtualHost> 

는 여기에 내가 문제가 htaccess로 확신 내 htaccess로

SetEnv APPLICATION_ENV development 

AddType application/x-httpd-php .php .htm .html 
AddHandler x-httpd-php .php .htm .html 
RewriteEngine On 
RewriteCond %{REQUEST_FILENAME} -s [OR] 
RewriteCond %{REQUEST_FILENAME} -l [OR] 
RewriteCond %{REQUEST_FILENAME} -d 
RewriteRule ^.*$ - [NC,L] 
RewriteRule ^.*$ index.php [NC,L] 

입니다. 이름을 바꾸면 페이지가 잘로드됩니다.

+0

어떤 페이지가 있습니까? PHP? HTML? –

+0

index.php. 하지만 문제는 AddHandler가 잘못되었다고 생각합니다. 특별히 큰 도움이되지는 마세요. 나는 그 환경 변수를 얻을 필요가있다. – smokingoyster

답변

0

사실, 그냥 알아 냈습니다. 이 줄이 었어.

AddHandler x-httpd-php .php .htm .html 

나는 그것을 제거했다. 환경 변수를 인쇄 할 수 없습니다.

echo getenv('APPLICATION_ENV'); 

생각 하시겠습니까?