<IfModule mod_rewrite.c>
    <IfModule IfModule mod_negotiation.c>
        Options -MultiViews -Indexes
    </IfModule>
	
	<Files .env>
		order allow,deny
		Deny from all 
	</Files>

    RewriteEngine On
    

    # Force HTTPS (Directly, without forcing HTTP first)
    RewriteCond %{HTTPS} off
    RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

    # Redirect www to non-www (modify if you prefer www)
    RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
    RewriteRule ^ https://%1%{REQUEST_URI} [L,R=301]

    # Allow access to existing files and directories
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d

    # Redirect all requests to the Laravel public folder
    RewriteRule ^(.*)$ public/$1 [L]

    # Handle requests through Laravel
    RewriteRule ^ index.php [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 php8_module>
   php_flag display_errors On
   php_value max_execution_time 9000
   php_value max_input_time 9000
   php_value max_input_vars 10000
   php_value memory_limit -1
   php_value post_max_size 1024M
   php_value session.gc_maxlifetime 14400
   php_value session.save_path "/var/cpanel/php/sessions/ea-php83"
   php_value upload_max_filesize 1024M
   php_flag zlib.output_compression Off
</IfModule>
<IfModule lsapi_module>
   php_flag display_errors On
   php_value max_execution_time 9000
   php_value max_input_time 9000
   php_value max_input_vars 10000
   php_value memory_limit -1
   php_value post_max_size 1024M
   php_value session.gc_maxlifetime 14400
   php_value session.save_path "/var/cpanel/php/sessions/ea-php83"
   php_value upload_max_filesize 1024M
   php_flag zlib.output_compression Off
</IfModule>
# END cPanel-generated php ini directives, do not edit

# 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
