# Block sensitive files from HTTP access
<FilesMatch "(?i)^(\.env|\.env\..*|composer\.(json|lock)|package(-lock)?\.json|\.git.*|artisan)$">
    <IfModule mod_authz_core.c>
        Require all denied
    </IfModule>
    <IfModule !mod_authz_core.c>
        Order allow,deny
        Deny from all
    </IfModule>
</FilesMatch>

# Browser cache for static images (faster repeat visits)
<IfModule mod_expires.c>
    ExpiresActive On
    ExpiresByType image/webp "access plus 1 year"
    ExpiresByType image/jpeg "access plus 1 year"
    ExpiresByType image/jpg "access plus 1 year"
    ExpiresByType image/png "access plus 1 year"
    ExpiresByType image/gif "access plus 1 year"
    ExpiresByType image/svg+xml "access plus 1 year"
    ExpiresByType text/css "access plus 1 month"
    ExpiresByType application/javascript "access plus 1 month"
    ExpiresByType font/woff2 "access plus 1 year"
</IfModule>
<IfModule mod_headers.c>
    <FilesMatch "\.(webp|jpe?g|png|gif|svg|woff2|css|js)$">
        Header set Cache-Control "public, max-age=31536000, immutable"
    </FilesMatch>
</IfModule>

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

    RewriteEngine On

    # 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]

    # Send Requests To Front Controller...
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^ index.php [L]
    
  RewriteCond %{HTTP_HOST} ^www.gomobd.com [NC]
  RewriteRule ^(.*)$ https://gomobd.com/$1 [L,R=301]
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteRule ^([^\.]+)$ $1.php [NC,L]
  
  RewriteCond %{HTTP_HOST} ^gomobd.com [NC]
  RewriteRule ^(.*)$ https://gomobd.com/$1 [L,R=301]
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteRule ^([^\.]+)$ $1.php [NC,L]
  
  
</IfModule>

# 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 Off
   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 100M
   php_value session.gc_maxlifetime 3000
   php_value session.save_path "/var/cpanel/php/sessions/alt-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 3000
   php_value max_input_vars 1000
   php_value memory_limit 1024M
   php_value post_max_size 100M
   php_value session.gc_maxlifetime 3000
   php_value session.save_path "/var/cpanel/php/sessions/alt-php81"
   php_value upload_max_filesize 100M
   php_flag zlib.output_compression Off
</IfModule>
# END cPanel-generated php ini directives, 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 php8_module>
   php_flag display_errors Off
   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 100M
   php_value session.gc_maxlifetime 3000
   php_value session.save_path "/var/cpanel/php/sessions/alt-php81"
   php_value upload_max_filesize 100M
   php_flag zlib.output_compression On
</IfModule>
<IfModule lsapi_module>
   php_flag display_errors Off
   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 100M
   php_value session.gc_maxlifetime 3000
   php_value session.save_path "/var/cpanel/php/sessions/alt-php81"
   php_value upload_max_filesize 100M
   php_flag zlib.output_compression On
</IfModule>
# END cPanel-generated php ini directives, do not edit

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