Options -Indexes
RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
RewriteCond %{THE_REQUEST} \s/+(.+?)\.php[\s?] [NC]
RewriteRule ^(.+)\.php$ /$1 [R=301,L]
RewriteRule ^$ home [L]
RewriteRule ^([A-Za-z0-9_-]+)$ $1.php [L,QSA]
RewriteRule ^admin/([A-Za-z0-9_-]+)$ admin/$1.php [L,QSA]
RewriteRule ^tutor/([A-Za-z0-9_-]+)$ tutor/$1.php [L,QSA]
RewriteRule ^accountant/([A-Za-z0-9_-]+)$ accountant/$1.php [L,QSA]
RewriteRule ^student/([A-Za-z0-9_-]+)$ student/$1.php [L,QSA]
<FilesMatch "\.(sql|log|ini|env)$">Require all denied</FilesMatch>
