-
Notifications
You must be signed in to change notification settings - Fork 2
/
.htaccess
55 lines (50 loc) · 1.98 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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#Change CI_ENV from developemnt to production if it running on real server
SetEnv CI_ENV production
<Limit GET POST DELETE PUT>
Order deny,allow
Allow from all
</Limit>
<IfModule mod_rewrite.c>
RewriteEngine On
# RewriteRule .* maintenance.html [NC]
# !IMPORTANT! Set your RewriteBase here and don't forget trailing and leading
# slashes.
# If your page resides at
# http://www.example.com/mypage/test1
# then use
# RewriteBase /mypage/test1/
RewriteBase /
#Anti Neko-miku
RewriteCond %{HTTP:Referer} ^((?:|.+)ndos.pro(?:|.+))|((?:|.+)neko-miku(?:|.+))|((?:|.+)nullrefer.com(?:|.+))$
RewriteRule .* https://assets.pureapp.in.th/neko508.html [R=302,L]
#Enforce HTTPS
RewriteCond %{HTTP_HOST} !=localhost
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{SERVER_NAME}/$1 [R,L]
#NormalRule for Static page
RewriteRule ^จัดการ$ assets/html/user_manage.html [L]
RewriteRule ^ผู้ดูแล$ assets/html/admin_manage.html [L]
RewriteRule ^ข้อตกลง$ assets/html/term.html [L]
RewriteRule ^ระงับ$ assets/html/link_disable.html [L]
#API protection by referer (Set more referer for whitelist);
RewriteCond %{HTTP:Referer} !^(?:|.+)\:\/\/(localhost|ไป\.ไทย)\/(?:|.+)$
RewriteRule ^api/(|.+)$ assets/html/api_denied.html [L]
#Rewrite Homepage use static
RewriteRule ^$ assets/html/main.html
#Codeigniter Path Redirecter
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?/$1 [L]
</IfModule>
<IfModule !mod_rewrite.c>
# If we don't have mod_rewrite installed, all 404's
# can be sent to index.php, and everything works as normal.
# Submitted by: ElliotHaughin
ErrorDocument 404 /index.php
</IfModule>
ErrorDocument 508 /500.shtml
#HTML static page cache
<filesMatch "\.(html|htm|css|js|jpg|jpeg|png)$">
#Remove must-revalidate follow MDN docs // will undo if it take an error
Header set Cache-Control "max-age=31536000, min-fresh=7200, public"
</filesMatch>