2011-04-11 6 views
1

I'vee는/연결 폴더에 다음과 같은 htaccess로 파일을 가지고 내가 (이미 명령이있는)을 httpd.conf 파일에이 통합해야합니다

/연결/htaccess로

SetEnv APPLICATION_ENV development 
RewriteEngine On 
RewriteBase /connect 
RewriteCond %{REQUEST_FILENAME} -s [OR] 
RewriteCond %{REQUEST_FILENAME} -l [OR] 
RewriteCond %{REQUEST_FILENAME} -d 
RewriteRule ^.*$ - [NC,L] 
RewriteRule ^.*$ index.php [NC,L] 

을 httpd.conf

... 
NameVirtualHost *:80 

<VirtualHost *:80> 
DocumentRoot /var/www/html/alter 
ServerName www.mysite.com 

<IfModule mod_rewrite.c> 
    RewriteEngine On 

RewriteCond %{HTTP_HOST} !^www\. 
RewriteCond %{HTTPS}s ^on(s)| 
RewriteRule^http%1://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301] 
... 
.... 

내가 아래에 위의 맞는 방법을 모르겠어요?

답변

2

은 htaccess로는 기본적으로 httpd.conf 파일에서 블록의 내장, 그래서 당신은이 만족스러운 경우 일단 당신이, 당신은 단지 그런 기회를해야 뭔가

<Virtualhost *:80> 
    DocumentRoot ... 
    ServerName ... 
    etc.... 
    <Directory /var/www/html/alter> 
     ... guts of .htaccess here ... 
    </Directory> 
</VirtualHost> 

같은 비록 원하는 것입니다. htaccess가 제대로 작동하고 더 이상 변경되지 않습니다. httpd.conf를 변경하면 .htaccess 변경 사항이 다음 요청에 즉시 적용되는 동안 서버를 바운스해야합니다.

+0

감사합니다 ........ – siliconpi