Options -Indexes

# السماح بتشغيل PHP لكل الملفات
<FilesMatch "\.php$">
    Order Allow,Deny
    Allow from all
</FilesMatch>

# توجيه الجذر مباشرة للصفحة الرئيسية
DirectoryIndex public/home.php home.php index.php

# حماية المجلدات الحساسة
<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /legal-cms/

    # منع الوصول المباشر لمجلدات config و includes
    RewriteRule ^config/.*$ - [F,L]
    RewriteRule ^includes/.*$ - [F,L]
    RewriteRule ^database/.*$ - [F,L]
</IfModule>
