<IfModule mod_rewrite.c>
RewriteEngine On


RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

# Disable directory listing
Options -Indexes

# Enable rewrite engine
RewriteEngine On
RewriteBase /

# Prevent direct access to directories and redirect to homepage
# RewriteCond %{REQUEST_FILENAME} -d
# RewriteRule ^.*$ / [R=301,L]

# Allow access to specific files
<FilesMatch "\.(html|xml|webp|json|pdf|doc|docx|txt|jpg|jpeg|png|gif|css|js|manifest|epub|pptx)$">
    Order allow,deny
    Allow from all
</FilesMatch>

