# Gulf Car Parking System - Public Directory
# This file should be in: /home/meezma5/park.meezmart.com/parking/public/.htaccess

# Set default index files
DirectoryIndex home.php index.php index.html

# Prevent directory listing
Options -Indexes

# Disable URL rewriting (prevent unwanted redirects)
<IfModule mod_rewrite.c>
    RewriteEngine Off
</IfModule>

# Protect sensitive files
<FilesMatch "^\.">
    Order allow,deny
    Deny from all
</FilesMatch>

# Block access to .env files
<Files ".env">
    Order allow,deny
    Deny from all
</Files>

# Block access to .git folder
<FilesMatch "^\.git">
    Order allow,deny
    Deny from all
</FilesMatch>

# Set default charset
AddDefaultCharset UTF-8

# Security headers
<IfModule mod_headers.c>
    Header set X-Content-Type-Options "nosniff"
    Header set X-Frame-Options "SAMEORIGIN"
    Header set X-XSS-Protection "1; mode=block"
</IfModule>

# PHP settings (if allowed by hosting)
<IfModule mod_php7.c>
    php_flag display_errors Off
    php_flag log_errors On
    php_value max_execution_time 300
    php_value upload_max_filesize 10M
    php_value post_max_size 10M
</IfModule>

<IfModule mod_php8.c>
    php_flag display_errors Off
    php_flag log_errors On
    php_value max_execution_time 300
    php_value upload_max_filesize 10M
    php_value post_max_size 10M
</IfModule>
