<IfModule mod_rewrite.c>
    <IfModule mod_negotiation.c>
        Options -MultiViews
    </IfModule>

    RewriteEngine On

    RewriteCond %{REQUEST_FILENAME} -d [OR]
    RewriteCond %{REQUEST_FILENAME} -f
    RewriteRule ^ ^$1 [N]

    RewriteCond %{REQUEST_URI} (\.\w+$) [NC]
    RewriteRule ^(.*)$ public/$1

    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^ server.php
</IfModule>

# BEGIN cPanel-generated php ini directives, do not edit
<IfModule php8_module>
   php_flag display_errors Off
   php_value max_execution_time 3000
   php_value max_input_time 6000
   php_value max_input_vars 1000
   php_value memory_limit 128M
   php_value post_max_size 100M
   php_value session.gc_maxlifetime 1440
   php_value session.save_path "/var/cpanel/php/sessions/ea-php81"
   php_value upload_max_filesize 100M
   php_flag zlib.output_compression Off
</IfModule>
<IfModule lsapi_module>
   php_flag display_errors Off
   php_value max_execution_time 3000
   php_value max_input_time 6000
   php_value max_input_vars 1000
   php_value memory_limit 128M
   php_value post_max_size 100M
   php_value session.gc_maxlifetime 1440
   php_value session.save_path "/var/cpanel/php/sessions/ea-php81"
   php_value upload_max_filesize 100M
   php_flag zlib.output_compression Off
</IfModule>
# END cPanel-generated php ini directives, do not edit

# ===== SPEED OPTIMIZATION =====
<IfModule mod_expires.c>
    ExpiresActive On
    ExpiresByType font/woff2                 "access plus 1 year"
    ExpiresByType font/woff                  "access plus 1 year"
    ExpiresByType application/x-font-ttf     "access plus 1 year"
    ExpiresByType font/ttf                   "access plus 1 year"
    ExpiresByType text/css                   "access plus 1 year"
    ExpiresByType application/javascript     "access plus 1 year"
    ExpiresByType text/javascript            "access plus 1 year"
  ExpiresByType image/webp    "access plus 1 year"
ExpiresByType image/jpeg    "access plus 1 year"
ExpiresByType image/png     "access plus 1 year"
ExpiresByType image/svg+xml "access plus 1 year"
    ExpiresByType image/x-icon               "access plus 1 year"
</IfModule>

<IfModule mod_headers.c>
    <FilesMatch "\.(woff2|woff|ttf|css|js)$">
        Header set Cache-Control "public, max-age=31536000, immutable"
    </FilesMatch>
 <FilesMatch "\.(webp|jpg|jpeg|png|svg|ico)$">
    Header set Cache-Control "public, max-age=31536000, immutable"
</FilesMatch>
</IfModule>

<IfModule mod_deflate.c>
    AddOutputFilterByType DEFLATE text/html
    AddOutputFilterByType DEFLATE text/css
    AddOutputFilterByType DEFLATE application/javascript
    AddOutputFilterByType DEFLATE text/javascript
    AddOutputFilterByType DEFLATE application/json
    AddOutputFilterByType DEFLATE image/svg+xml
    AddOutputFilterByType DEFLATE font/woff2
    AddOutputFilterByType DEFLATE font/woff
</IfModule>
# ===== END SPEED OPTIMIZATION =====

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