# WebGIS Configuration
<IfModule mod_headers.c>
    Header add Access-Control-Allow-Origin "*"
    Header add Access-Control-Allow-Methods "GET, POST, PUT, DELETE, OPTIONS"
    Header add Access-Control-Allow-Headers "Content-Type"
</IfModule>

<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /webgis/
    
    # Allow access to PHP files
    RewriteRule ^api/(.*)\.php$ $1.php [L]
    
    # Disable directory listing
    Options -Indexes
</IfModule>

# Allow PHP execution
AddType application/x-httpd-php .php
