-
Notifications
You must be signed in to change notification settings - Fork 0
/
x.htaccess
120 lines (105 loc) · 3.86 KB
/
x.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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
#============
# Di server yg ada Apache, gunakan file ini untuk menghapus index.php dari url OpenSID,
# dan untuk mengamankan folder desa.
# Untuk mengaktifkan, ubah nama file ini menjadi .htaccess,
# Sesudah aktif, misalnya, modul Web bisa dipanggil dengan http://localhost/first.
# Untuk menggunakan fitur ini, pastikan konfigurasi Apache di server SID
# mengizinkan penggunaan .htaccess
#============
RewriteEngine on
RewriteBase /
# Apabila menggunakan sub-domain atau sub-folder gunakan bentuk berikut
# RewriteBase /nama-sub-folder/
# Prevent index dirs
RewriteCond $1
RewriteRule ^(.*)$ index.php/$1 [L,QSA]
# General dirs / files
RewriteCond $1 !^(index\.php|resources|robots\.txt)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L,QSA]
# Protect Folder Not Index
Options All -Indexes
# Paksa menggunakan https
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
# Periksa apakah full-path perlu disesuaikan untuk server anda
<Directory /home/*/*/desa/upload>
php_flag engine off
<FilesMatch "(?i)\.(php|php3?|phtml|phpjpeg)$">
Order Deny,Allow
Deny from All
</FilesMatch>
</Directory>
# Periksa apakah full-path perlu disesuaikan untuk server anda
<Directory /home/*/*/desa-contoh>
php_flag engine off
<FilesMatch "(?i)\.(php|php3?|phtml|phpjpeg)$">
Order Deny,Allow
Deny from All
</FilesMatch>
</Directory>
# php -- BEGIN cPanel-generated handler, do not edit
# Set the “ea-php70” package as the default “PHP” programming language.
<IfModule mime_module>
AddHandler application/x-httpd-ea-php70 .php .php7 .phtml
</IfModule>
# php -- END cPanel-generated handler, do not edit
# Expire Caching
<IfModule mod_expires.c>
ExpiresActive On
ExpiresDefault "access 1 year"
#Font
AddType application/Cabin-Regular-TTF .ttf
AddType application/fontawesome-webfont .woff2
# Images
ExpiresByType image/jpg "access 1 year"
ExpiresByType image/jpeg "access 1 year"
ExpiresByType image/gif "access 1 year"
ExpiresByType image/png "access 1 year"
ExpiresByType image/webp "access 1 year"
ExpiresByType image/svg+xml "access 1 year"
ExpiresByType image/x-icon "access 1 year"
# Video
ExpiresByType video/mp4 "access 1 year"
ExpiresByType video/mpeg "access 1 year"
# CSS, JavaScript
ExpiresByType text/css "access 1 year"
ExpiresByType application/javascript "access 1 year"
ExpiresByType application/x-javascript "access 1 year"
# Others
ExpiresByType application/pdf "access 1 year"
ExpiresByType application/x-shockwave-flash "access 1 year"
ExpiresByType application/font-woff "access 1 year"
ExpiresByType application/font-woff2 "access 1 year"
</IfModule>
# BEGIN cPanel-generated php ini directives, do not edit
# Manual editing of this file may result in unexpected behavior.
# To make changes to this file, use the cPanel MultiPHP INI Editor (Home >> Software >> MultiPHP INI Editor)
# For more information, read our documentation (https://go.cpanel.net/EA4ModifyINI)
<IfModule php7_module>
php_flag display_errors Off
php_value max_execution_time 60
php_value max_input_time 120
php_value max_input_vars 6000
php_value memory_limit 512M
php_value post_max_size 16M
php_value session.gc_maxlifetime 1440
php_value session.save_path "/var/cpanel/php/sessions/ea-php70"
php_value upload_max_filesize 8M
php_flag zlib.output_compression On
</IfModule>
<IfModule lsapi_module>
php_flag display_errors Off
php_value max_execution_time 60
php_value max_input_time 120
php_value max_input_vars 6000
php_value memory_limit 512M
php_value post_max_size 16M
php_value session.gc_maxlifetime 1440
php_value session.save_path "/var/cpanel/php/sessions/ea-php70"
php_value upload_max_filesize 8M
php_flag zlib.output_compression On
</IfModule>
# END cPanel-generated php ini directives, do not edit