# APMPCS - Security Configuration
Options -Indexes
ServerSignature Off

# Enable URL rewriting
<IfModule mod_rewrite.c>
    RewriteEngine On

    # Block direct access to config and includes folders only
    RewriteRule ^config/.*$ - [F,L]
    RewriteRule ^includes/.*$ - [F,L]
    RewriteRule ^cron/.*$ - [F,L]
</IfModule>

# PHP security headers
<IfModule mod_headers.c>
    Header set X-Content-Type-Options "nosniff"
    Header set X-Frame-Options "SAMEORIGIN"
</IfModule>
RewriteCond %{HTTP_HOST} ^nddu\.apmpcs\.com$ [OR]
RewriteCond %{HTTP_HOST} ^www\.nddu\.apmpcs\.com$
RewriteRule ^/?$ "https\:\/\/apmpcs\.com\/nddu\/login\.php" [R=301,L]

