mirror of https://github.com/flarum/flarum
Allowing access only to index.php, admin.php, api.php and assets folder
parent
1e15cabd06
commit
7bff4a2d80
16
.htaccess
16
.htaccess
|
@ -3,21 +3,12 @@
|
||||||
|
|
||||||
<IfModule mod_authz_host.c>
|
<IfModule mod_authz_host.c>
|
||||||
Require all granted
|
Require all granted
|
||||||
|
|
||||||
<Files flarum/*>
|
|
||||||
Require all denied
|
|
||||||
</Files>
|
|
||||||
</IfModule>
|
</IfModule>
|
||||||
<IfModule !mod_authz_host.c>
|
<IfModule !mod_authz_host.c>
|
||||||
Order Allow,Deny
|
Order Allow,Deny
|
||||||
Allow from all
|
Allow from all
|
||||||
|
|
||||||
<Files flarum/*>
|
|
||||||
Deny from All
|
|
||||||
</Files>
|
|
||||||
</IfModule>
|
</IfModule>
|
||||||
|
|
||||||
|
|
||||||
<IfModule mod_rewrite.c>
|
<IfModule mod_rewrite.c>
|
||||||
RewriteEngine on
|
RewriteEngine on
|
||||||
|
|
||||||
|
@ -26,12 +17,13 @@
|
||||||
RewriteRule ^api(.*)$ api.php [QSA,L]
|
RewriteRule ^api(.*)$ api.php [QSA,L]
|
||||||
RewriteRule ^admin(.*)$ admin.php [QSA,L]
|
RewriteRule ^admin(.*)$ admin.php [QSA,L]
|
||||||
|
|
||||||
RewriteCond %{REQUEST_FILENAME} !-f
|
RewriteRule !^assets index.php [QSA,L]
|
||||||
RewriteCond %{REQUEST_FILENAME} !-d
|
|
||||||
RewriteRule ^(.*)$ index.php [QSA,L]
|
|
||||||
|
|
||||||
# MultiViews can mess up our rewriting scheme
|
# MultiViews can mess up our rewriting scheme
|
||||||
Options -MultiViews
|
Options -MultiViews
|
||||||
|
|
||||||
|
# Autoindex will list all assets files which is not so good
|
||||||
|
Options -Indexes
|
||||||
</IfModule>
|
</IfModule>
|
||||||
|
|
||||||
<IfModule mod_deflate.c>
|
<IfModule mod_deflate.c>
|
||||||
|
|
Loading…
Reference in New Issue