<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteCond %{THE_REQUEST} \s/public[\/\s\?] [NC]
RewriteRule ^public/?(.*)$ /$1 [R=301,L]
    
    # منع الوصول المباشر لمجلد public
    RewriteRule ^public/ - [F,L]
    
    # توجيه كل الطلبات إلى public/index.php
    RewriteCond %{REQUEST_URI} !^/public/
    RewriteRule ^(.*)$ /public/$1 [L]
    
    # التعامل مع index.php
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^ public/index.php [L]
</IfModule>

<Files 403.shtml>
order allow,deny
allow from all
</Files>

deny from 52.169.18.25

# 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 .php .php8 .phtml
</IfModule>
# php -- END cPanel-generated handler, do not edit
