akaunting/.htaccess

46 lines
1.4 KiB
ApacheConf
Raw Normal View History

2018-06-29 18:48:10 +03:00
# Prevent Directory Listing
2018-06-29 14:58:40 +03:00
<IfModule autoindex>
2018-06-29 18:48:10 +03:00
IndexIgnore *
2018-06-29 14:58:40 +03:00
</IfModule>
2017-09-14 22:21:00 +03:00
<IfModule mod_rewrite.c>
2018-06-29 18:48:10 +03:00
# Prevent Directory Listing
2017-09-14 22:21:00 +03:00
<IfModule mod_negotiation.c>
2018-06-29 18:48:10 +03:00
Options -MultiViews -Indexes
2017-09-14 22:21:00 +03:00
</IfModule>
RewriteEngine On
2017-12-02 12:43:55 +03:00
# Prevent Direct Access to Protected Files
2020-02-20 13:31:10 +03:00
<FilesMatch "(?i)(^artisan$|\.env|\.log)">
# Apache 2.2 syntax
<IfModule !mod_authz_core.c>
Order deny,allow
Deny from all
</IfModule>
# Apache 2.4 syntax
<IfModule mod_authz_core.c>
Require all denied
</IfModule>
2017-12-02 12:43:55 +03:00
</FilesMatch>
2017-09-28 18:10:13 +03:00
# Prevent Direct Access To Protected Folders
2020-02-20 09:42:03 +03:00
RewriteRule ^(app|bootstrap|config|database|overrides|resources|routes|storage|tests)/(.*) / [L,R=301]
2017-09-28 18:10:13 +03:00
# Prevent Direct Access To modules/vendor Folders Except Assets
2021-02-10 00:40:59 +03:00
RewriteRule ^(modules|vendor)/(.*)\.((?!ico|gif|jpg|jpeg|png|js\b|css|less|sass|font|woff|woff2|eot|ttf|svg).)*$ / [L,R=301]
2017-09-28 18:10:13 +03:00
2017-09-14 22:21:00 +03:00
# Redirect Trailing Slashes If Not A Folder...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)/$ /$1 [L,R=301]
2020-03-04 11:09:28 +03:00
# Send Requests To Front Controller...
2017-09-14 22:21:00 +03:00
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
# Handle Authorization Header
RewriteCond %{HTTP:Authorization} .
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
</IfModule>