This repository has been archived by the owner on Mar 20, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.htaccess
53 lines (43 loc) · 1.58 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
<IfModule mod_rewrite.c>
Options +FollowSymLinks -MultiViews
RewriteEngine On
RewriteRule ^admin/ - [L,NC]
RewriteCond %{THE_REQUEST} \ /(.+/)?index\.php(\?.*)?\ [NC]
RewriteRule ^(.+/)?index\.php$ /%1 [NC,R=301,L]
RewriteCond %{ENV:REDIRECT_STATUS} ^$
RewriteCond %{SCRIPT_FILENAME} -f
RewriteCond %{REQUEST_URI} ^(/.+)\.php$
RewriteRule ^(.+)\.php$ %1/ [R=301,L]
RewriteCond %{REQUEST_URI} !(/$|\.)
RewriteRule (.*) %{REQUEST_URI}/ [R=301,L]
RewriteCond %{REQUEST_URI} ^(/.+)/$
RewriteCond %{DOCUMENT_ROOT}%1.php -f
RewriteRule ^.+/$ %1.php [QSA,L]
</IfModule>
<IfModule mod_expires.c>
ExpiresActive On
ExpiresByType image/gif "access plus 7 days"
ExpiresByType image/ico "access plus 7 days"
ExpiresByType image/jpeg "access plus 7 days"
ExpiresByType image/jpg "access plus 7 days"
ExpiresByType image/png "access plus 7 days"
ExpiresByType text/css "access plus 7 days"
ExpiresByType text/javascript "access plus 7 days"
ExpiresByType application/x-javascript "access plus 7 days"
ExpiresByType application/javascript "access plus 7 days"
</IfModule>
<IfModule mod_headers.c>
<FilesMatch "\.(gif|ico|jpeg|jpg|jpe|png)$">
Header set Cache-Control "max-age=604800, public"
</FilesMatch>
<FilesMatch "\.(css|js)$">
Header set Cache-Control "max-age=604800, public, must-revalidate"
</FilesMatch>
<filesMatch ".(php|cgi)$">
Header set Cache-Control "max-age=0, private, no-store, no-cache, must-revalidate"
</filesMatch>
</IfModule>
<Files .htaccess>
order allow,deny
deny from all
</Files>