-
Notifications
You must be signed in to change notification settings - Fork 1
/
.htaccess-nocache
58 lines (49 loc) · 1.59 KB
/
.htaccess-nocache
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
# HTACCESS NO CACHE (DEVELOPMENT)
Options -Indexes
RewriteEngine on
RewriteCond %{SCRIPT_FILENAME} !-f
RewriteCond %{SCRIPT_FILENAME} !-d
RewriteCond %{SCRIPT_FILENAME} !-l
RewriteRule ^(.*)$ index.php/$1
# custom domain for blog
#RewriteCond %{HTTP_HOST} ^blog\.webmanajemen\.com [NC]
#RewriteRule ^(.*)$ etc/blog/index.php [NC,QSA]
RewriteCond %{HTTP_HOST} ^blog\.php\.io [NC]
RewriteRule ^(.*)$ etc/blog/index.php [NC,QSA]
# Fix Mixed Contents
<ifModule mod_headers.c>
Header always set Content-Security-Policy "upgrade-insecure-requests;"
</IfModule>
# DISABLE CACHING
<IfModule mod_headers.c>
Header set Cache-Control "no-cache, no-store, must-revalidate"
Header set Pragma "no-cache"
Header set Expires 0
</IfModule>
<FilesMatch "\.(css|flv|gif|htm|html|ico|jpe|jpeg|jpg|js|mp3|mp4|png|pdf|swf|txt)$">
<IfModule mod_expires.c>
ExpiresActive Off
</IfModule>
<IfModule mod_headers.c>
FileETag None
Header unset ETag
Header unset Pragma
Header unset Cache-Control
Header unset Last-Modified
Header set Pragma "no-cache"
Header set Cache-Control "max-age=0, no-cache, no-store, must-revalidate"
Header set Expires "Thu, 1 Jan 1970 00:00:00 GMT"
</IfModule>
</FilesMatch>
<FilesMatch "\.(?:inc|ini|sh|py|java|jar|har|json|bat|zip|tgz|tar|rar|txt|htaccess)$">
Order allow,deny
Deny from all
</FilesMatch>
<FilesMatch ".*\.(css|js|png|jpg|gif|jpeg|bmp|ico|woff|woff2|otf|map)$">
Order Allow,Deny
Allow from all
</FilesMatch>
<FilesMatch "(manifest\.json)$">
Order Allow,Deny
Allow from all
</FilesMatch>