# Apache 기본 설정
Options +FollowSymLinks
RewriteEngine On

# 파일 접근 권한 설정
<IfModule mod_rewrite.c>
    RewriteEngine On

    # /elfinder 디렉토리로 들어오는 모든 요청을 처리
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ /elfinder/$1 [L]
    RewriteCond %{REQUEST_URI} !^/elfinder/
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]

</IfModule>

# DirectoryIndex 설정
DirectoryIndex index.html index.php

# 파일 숨기기
<FilesMatch "^\.ht">
    Require all denied
</FilesMatch>

# 캐시 제어
<IfModule mod_expires.c>
    ExpiresActive On
    ExpiresDefault "access plus 1 month"
</IfModule>
