Require all granted
Options -Indexes -MultiViews
DirectoryIndex index.php
# If backend/ was uploaded OUTSIDE the document root, uncomment and fix the path:
# SetEnv GYM_ROOT /home/CPANELUSER/gym-backend

<IfModule mod_rewrite.c>
  RewriteEngine On
  # force HTTPS
  RewriteCond %{HTTPS} !=on
  RewriteCond %{HTTP:X-Forwarded-Proto} !=https
  RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
  # keep the Authorization header on CGI/FastCGI (Namecheap)
  RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteRule ^ index.php [L]
</IfModule>
<IfModule mod_headers.c>
  Header always set X-Content-Type-Options "nosniff"
  Header always set X-Frame-Options "DENY"
</IfModule>
<FilesMatch "\.(sql|log|md|env|ini|bak|dump|gz)$">
  Require all denied
</FilesMatch>
