Apache에서 디렉토리 색인 생성을 비활성화하고 싶습니다.
이것은 내 .htaccess 파일 전체입니다. 그러나 주석을 제거하자마자 Options -Indexes
서버가 넘어집니다.
내가 도대체 뭘 잘못하고있는 겁니까?
#Options –Indexes
<IfModule mod_expires.c>
# Turn on the Expires engine
ExpiresActive On
# CSS and JavaScript
ExpiresByType text/css "access plus 1 hour"
ExpiresByType application/javascript "access plus 1 hour"
# Media: images
ExpiresByType image/gif "access plus 1 month"
ExpiresByType image/png "access plus 1 month"
ExpiresByType image/jpg "access plus 1 month"
ExpiresByType image/jpeg "access plus 1 month"
# Webfonts
ExpiresByType application/x-font-ttf "access plus 1 month"
ExpiresByType font/opentype "access plus 1 month"
ExpiresByType application/x-font-woff "access plus 1 month"
ExpiresByType image/svg+xml "access plus 1 month"
ExpiresByType application/vnd.ms-fontobject "access plus 1 month"
<IfModule mod_headers.c>
Header append Cache-Control "public"
</IfModule>
</IfModule>
답변1
아마도 Apache가 .htaccess의 어떤 옵션도 조정할 수 없는 값으로 설정 httpd.conf
되어 구성되어 있을 것입니다.AllowOverride
httpd.conf
Apache 오류 로그 에 액세스할 수 있습니까 ?
답변2
다른 사람이 같은 문제에 직면하는 경우 문제는 내가복사하여 붙여넣었습니다줄에 :
Options –Indexes
그리고 Apache는 하이픈 인코딩에 대처할 수 없었습니다!