# Use PHP index file as default
DirectoryIndex index.php index.html

# Enable URL rewriting
RewriteEngine On

# Redirect all traffic to index.php
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php [L,QSA]

# Prevent directory listing
Options -Indexes

# Enable PHP error reporting
php_flag display_errors on
php_value error_reporting E_ALL


RewriteCond %{HTTP_HOST} ^www.adit.academy [NC]
RewriteRule (.*) https://adit.academy/$1 [L,R=301]
