# Allow access if Flarum is installed in a subdirectory,
# but another .htaccess in a higher directory denies access.
Order Allow,Deny
Allow from all
<Files flarum/*>
Deny from All
</Files>
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteRule ^api(.*)$ api.php [QSA,L]
RewriteRule ^admin(.*)$ admin.php [QSA,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php [QSA,L]
# MultiViews can mess up our rewriting scheme
Options -MultiViews
</IfModule>