2013-12-15 2 views
0

로컬 호스트에서 동일한 폴더에 filename.html 파일과 .htaccess 파일이 있습니다..htaccess를 올바르게 구성하십시오.

sudo nano /etc/apache2/sites-available/default 

<VirtualHost *:80> 
     ServerAdmin [email protected] 
     DocumentRoot /var/www 
     <Directory /> 
       Options FollowSymLinks 
       AllowOverride All 
     </Directory> 
     <Directory /var/www/> 
       Options Indexes FollowSymLinks MultiViews 
       AllowOverride All 
       Order allow,deny 
       allow from all 
     </Directory> 

     ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/ 
     <Directory "/usr/lib/cgi-bin"> 

       AllowOverride All 
       Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch 
       Order allow,deny 
       Allow from all 
     </Directory> 

     ErrorLog ${APACHE_LOG_DIR}/error.log 

     # Possible values include: debug, info, notice, warn, error, crit, 
     # alert, emerg. 
     LogLevel warn 

     CustomLog ${APACHE_LOG_DIR}/access.log combined 
</VirtualHost> 

sudo service apache2 restart 

답변

0

내가 찾은 :

RewriteEngine On 
Options +FollowSymLinks 
RewriteRule ^test\.html http://www.google.com/? [R=301,L] 

나는 리눅스 오전
redirect 301 /filename.html http://www.google.com 

, 나는 서버를 구성한 : 내 htaccess로 작동하지 않는 이유

나는 알아 내야

내 RewriteEngine이 작동 중입니다.

관련 문제