-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.htaccess
34 lines (29 loc) · 1.02 KB
/
.htaccess
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
<IfModule mod_rewrite.c>
RewriteEngine On
#Mencegah Hot Linking
#RewriteCond %{HTTP_REFERER} !^$
#RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?ftunesa.me [NC]
#RewriteRule \.(jpg|jpeg|png|gif|mp3)$ - [NC,F,L]
</IfModule>
# Mengaktifkan caching untuk static resources
<FilesMatch "\.(jpg|png|mp3|png|ico|css|map|js|html|xml|json|swf|otf|eot|svg|ttf|woff|woff2)$">
Header set Cache-Control "public, proxy-revalidate, max-age=160704000"
</FilesMatch>
# Enable gzip compression
<ifModule mod_gzip.c>
mod_gzip_on Yes
mod_gzip_dechunk Yes
mod_gzip_item_include file .(html?|txt|css|js|php|pl|json|xml)$
mod_gzip_item_include handler ^cgi-script$
mod_gzip_item_include mime ^text/.*
mod_gzip_item_include mime ^application/x-javascript.*
mod_gzip_item_exclude mime ^image/.*
mod_gzip_item_exclude rspheader ^Content-Encoding:.*gzip.*
</ifModule>
# Prevent viewing of .htaccess file
<Files .htaccess>
order allow,deny
deny from all
</Files>
# Prevent directory listings
Options All -Indexes