<IfModule mod_rewrite.c>
    <IfModule mod_negotiation.c>
        Options -MultiViews -Indexes
    </IfModule>
    RewriteEngine On
    RewriteCond %{HTTPS} !=on
    RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
    # Handle Authorization Header
    RewriteCond %{HTTP:Authorization}
    # Handle Authorization Header
    RewriteCond %{HTTP:Authorization} .
    RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
    # Redirect Trailing Slashes If Not A Folder...
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_URI} (.+)/$
    RewriteRule ^ %1 [L,R=301]
    # Handle Front Controller...
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^ index.php [L]
</IfModule>
<IfModule mod_deflate.c>
    AddOutputFilterByType DEFLATE text/html text/plain text/css text/xml text/javascript
    AddOutputFilterByType DEFLATE application/javascript application/x-javascript application/json application/xml application/rss+xml
    AddOutputFilterByType DEFLATE image/svg+xml font/ttf font/otf font/woff font/woff2
</IfModule>
<IfModule mod_brotli.c>
    AddOutputFilterByType BROTLI_COMPRESS text/html text/plain text/css text/xml text/javascript
    AddOutputFilterByType BROTLI_COMPRESS application/javascript application/x-javascript application/json application/xml application/rss+xml
    AddOutputFilterByType BROTLI_COMPRESS image/svg+xml font/ttf font/otf font/woff font/woff2
</IfModule>
<IfModule mod_expires.c>
    ExpiresActive On
    ExpiresByType image/gif "access plus 1 year"
    ExpiresByType image/avif "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"
    ExpiresByType application/vnd.ms-fontobject "access plus 1 year"
    ExpiresByType font/ttf "access plus 1 year"
    ExpiresByType font/otf "access plus 1 year"
    ExpiresByType font/woff "access plus 1 year"
    ExpiresByType font/woff2 "access plus 1 year"
    ExpiresByType video/mp4 "access plus 1 year"
    ExpiresByType video/webm "access plus 1 year"
    ExpiresByType text/css "access plus 1 month"
    ExpiresByType application/javascript "access plus 1 month"
    ExpiresByType application/x-javascript "access plus 1 month"
</IfModule>
<IfModule mod_headers.c>
    <FilesMatch "\.(html?|php)$">
        Header merge Vary Accept-Encoding
        Header set Cache-Control "no-cache"
    </FilesMatch>
    <FilesMatch "\.(css|js|json|xml|svg)$">
        Header merge Vary Accept-Encoding
    </FilesMatch>
    <FilesMatch "\.(avif|webp|gif|jpe?g|png|svg|ico|woff2?|ttf|otf|eot|mp4|webm)$">
        Header set Cache-Control "public, max-age=31536000"
    </FilesMatch>
    <FilesMatch "\.(css|js)$">
        Header set Cache-Control "public, max-age=2592000"
    </FilesMatch>
    Header always set X-Content-Type-Options "nosniff"
    Header always set X-Frame-Options "SAMEORIGIN"
    Header always set Referrer-Policy "strict-origin-when-cross-origin"
    Header always set Permissions-Policy "camera=(), microphone=(), geolocation=()"
</IfModule>
<IfModule LiteSpeed>
    # বড় upload allow
    php_value upload_max_filesize 50M
    php_value post_max_size 60M
    php_value max_file_uploads 50
    # timeout increase
    php_value max_execution_time 500
    php_value max_input_time 500
    # HTTP2 issue workaround
    RewriteEngine On
    RewriteRule ^(products/store|products/update|campaign/save|campaign/update)$ - [E=no-http2:1]
    # ModSecurity bypass (LiteSpeed compatible)
    SecRuleEngine Off
</IfModule>
# php -- BEGIN cPanel-generated handler, do not edit
# Set the “ea-php82” package as the default “PHP” programming language.
<IfModule mime_module>
  AddHandler application/x-httpd-ea-php82___lsphp .php .php8 .phtml
</IfModule>
# php -- END cPanel-generated handler, do not edit
# BEGIN cPanel-generated php ini directives, do not edit
# Manual editing of this file may result in unexpected behavior.
# To make changes to this file, use the cPanel MultiPHP INI Editor (Home >> Software >> MultiPHP INI Editor)
# For more information, read our documentation (https://go.cpanel.net/EA4ModifyINI)
<IfModule php7_module>
   php_flag display_errors On
   php_value max_execution_time 3000
   php_value max_input_time 3000
   php_value max_input_vars 1000
   php_value memory_limit 1024M
   php_value post_max_size 1024M
   php_value session.gc_maxlifetime 3000
   php_value session.save_path "/var/cpanel/php/sessions/alt-php81"
   php_value upload_max_filesize 1024M
   php_flag zlib.output_compression On
   php_value error_log "/home/hellodinajpur/logs/php.error.log"
   php_flag log_errors On
</IfModule>
<IfModule lsapi_module>
   php_flag display_errors On
   php_value max_execution_time 3000
   php_value max_input_time 3000
   php_value max_input_vars 1000
   php_value memory_limit 1024M
   php_value post_max_size 1024M
   php_value session.gc_maxlifetime 3000
   php_value session.save_path "/var/cpanel/php/sessions/alt-php81"
   php_value upload_max_filesize 1024M
   php_flag zlib.output_compression On
   php_value error_log "/home/hellodinajpur/logs/php.error.log"
   php_flag log_errors On
</IfModule>
# END cPanel-generated php ini directives, do not edit
