# Tradrr — /Tradrr/.htaccess (root splitter site)

Options -Indexes
Options -MultiViews

RewriteEngine On
RewriteBase /Tradrr/

# Root request → this directory's index.php
RewriteRule ^$ index.php [L]

# Serve existing files/directories directly
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d

# Route clean URLs (Forex/, Crypto/) to their index.php
RewriteRule ^(.+?)/?$ $1/index.php [L]

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

# No caching for PHP
<FilesMatch "\.php$">
  Header set Cache-Control "no-store, no-cache, must-revalidate"
</FilesMatch>

# Cache static assets 7 days
<FilesMatch "\.(css|js|png|jpg|jpeg|gif|svg|woff2?)$">
  Header set Cache-Control "public, max-age=604800"
</FilesMatch>
