<IfModule mod_rewrite.c>
    RewriteEngine On
    
    # Redirect all requests to public directory
    RewriteCond %{REQUEST_URI} !^/public/
    RewriteRule ^(.*)$ /public/$1 [L,QSA]
</IfModule>

# # Disable directory browsing
# Options -Indexes

# # Protect .env file
# <Files .env>
#     Order allow,deny
#     Deny from all
# </Files>

# # Protect .htaccess file
# <Files .htaccess>
#     Order allow,deny
#     Deny from all
# </Files>

# # Set default charset
# AddDefaultCharset UTF-8

# # Enable compression
# <IfModule mod_deflate.c>
#     AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css text/javascript application/javascript application/x-javascript application/json
# </IfModule>

# # Set cache control for static files
# <IfModule mod_expires.c>
#     ExpiresActive On
#     ExpiresByType image/jpg "access plus 1 year"
#     ExpiresByType image/jpeg "access plus 1 year"
#     ExpiresByType image/gif "access plus 1 year"
#     ExpiresByType image/png "access plus 1 year"
#     ExpiresByType text/css "access plus 1 month"
#     ExpiresByType application/javascript "access plus 1 month"
# </IfModule>

# php -- BEGIN cPanel-generated handler, do not edit
# Set the “ea-php83” package as the default “PHP” programming language.
<IfModule mime_module>
  AddHandler application/x-httpd-ea-php83 .php .php8 .phtml
</IfModule>
# php -- END cPanel-generated handler, do not edit
