# محافظت از پوشه گزارش‌های باگ
# Protection for bug reports uploads directory

# جلوگیری از لیست کردن فایل‌ها
# Prevent directory listing
Options -Indexes

# جلوگیری از اجرای PHP و script‌های دیگر
# Prevent execution of PHP and other scripts
<FilesMatch "\.(php|phtml|php3|php4|php5|phps|cgi|exe|pl|asp|aspx|shtml|shtm|fcgi|fpl|jsp|sh|bat|cmd|com|scr|vbs|js|jar|war|ear|class|py|rb|rhtml|jspx|jspf)$">
    Order Deny,Allow
    Deny from all
</FilesMatch>

# تنظیمات امنیتی برای فایل‌های تصویری
# Security settings for image files
<IfModule mod_headers.c>
    # اجازه نمایش تصاویر در مرورگر (برای نمایش در پنل)
    # Allow displaying images in browser (for panel display)
    <FilesMatch "\.(png|jpg|jpeg)$">
        Header set Content-Type "image/%{REQUEST_URI:e}"
        Header set Cache-Control "public, max-age=3600"
    </FilesMatch>
</IfModule>

# جلوگیری از اجرای script‌های دیگر
# Prevent execution of other scripts
RemoveHandler .php .phtml .php3 .php4 .php5 .phps .cgi .exe .pl .asp .aspx .shtml .shtm .fcgi .fpl .jsp .htm .html .js
RemoveType .php .phtml .php3 .php4 .php5 .phps .cgi .exe .pl .asp .aspx .shtml .shtm .fcgi .fpl .jsp .htm .html .js
