1
|
# Apache configuration file (see https://httpd.apache.org/docs/current/mod/quickreference.html)
|
2
|
Allow from all
|
3
|
|
4
|
# disable directory listing
|
5
|
<IfModule mod_autoindex.c>
|
6
|
Options -Indexes
|
7
|
</IfModule>
|
8
|
|
9
|
# enable cool URL
|
10
|
<IfModule mod_rewrite.c>
|
11
|
RewriteEngine On
|
12
|
# RewriteBase /
|
13
|
|
14
|
# prevents files starting with dot to be viewed by browser
|
15
|
RewriteRule /\.|^\.(?!well-known/) - [F]
|
16
|
|
17
|
# front controller
|
18
|
RewriteCond %{REQUEST_FILENAME} !-f
|
19
|
RewriteCond %{REQUEST_FILENAME} !-d
|
20
|
RewriteRule !\.(pdf|js|ico|gif|jpg|png|css|rar|zip|tar\.gz|map)$ index.php [L]
|
21
|
</IfModule>
|
22
|
|
23
|
# enable gzip compression
|
24
|
<IfModule mod_deflate.c>
|
25
|
<IfModule mod_filter.c>
|
26
|
AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css application/javascript application/json application/xml image/svg+xml
|
27
|
</IfModule>
|
28
|
</IfModule>
|