-
Notifications
You must be signed in to change notification settings - Fork 1
/
.htaccess
52 lines (50 loc) · 2.2 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
<IfModule mod_rewrite.c>
Options -Multiviews -Indexes +FollowSymLinks
RewriteEngine On
RewriteCond %{HTTPS} off [OR]
RewriteCond %{HTTP_HOST} ^www\. [NC]
RewriteCond %{HTTP_HOST} ^(?:www\.)?(.+)$ [NC]
RewriteRule ^ https://%1%{REQUEST_URI} [L,NE,R=301]
RewriteRule ^js/lazysizes.min.js node_modules/lazysizes/lazysizes.min.js [L]
RewriteRule ^js/jquery.min.js node_modules/jquery/dist/jquery.min.js [L]
RewriteRule ^js/jquery-ui.min.js node_modules/jqueryui/jquery-ui.min.js [L]
RewriteRule ^js/bootstrap.min.js node_modules/bootstrap/dist/js/bootstrap.bundle.min.js [L]
RewriteRule ^js/fancybox.umd.js node_modules/@fancyapps/ui/dist/fancybox.umd.js [L]
RewriteRule ^css/bootstrap.min.css node_modules/bootstrap/dist/css/bootstrap.min.css [L]
RewriteRule ^css/fontawesome.min.css node_modules/@fortawesome/fontawesome-free/css/all.min.css [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^css/main.css Utils/scripts.php [L]
RewriteRule ^css/main.css cache/css/main.css [L]
RewriteRule ^fonts/(fontawesome-.*)$ node_modules/@fortawesome/fontawesome-free/webfonts/$1 [NC,L]
RewriteRule ^webfonts/(.*)$ node_modules/@fortawesome/fontawesome-free/webfonts/$1 [NC,L]
RewriteRule ^css/(.*)$ assets/css/$1 [NC,L]
RewriteRule ^js/(.*)$ assets/js/$1 [NC,L]
RewriteRule ^fonts/(.*)$ assets/fonts/$1 [NC,L]
RewriteRule ^img/(.*)$ assets/img/$1 [NC,L]
RewriteRule ^videos/(.*)$ assets/videos/$1 [NC,L]
RewriteRule ^uploads/protected/(.*)$ index.php [NC,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^logout$ index.php?logout=true [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^scripts.js Utils/scripts.php [L]
RewriteRule ^scripts.css Utils/scripts.php [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . index.php [L]
</IfModule>
<IfModule mod_deflate.c>
<filesMatch "\.(js|css|html|php)$">
SetOutputFilter DEFLATE
</filesMatch>
</IfModule>
<IfModule mod_expires.c>
<Filesmatch "\.(jpg|jpeg|png|gif|webp|js|css|woff2|swf|ico|woff|mp3|json|mp4)$">
ExpiresActive on
ExpiresDefault "access plus 1 year"
</Filesmatch>
</IfModule>
<FilesMatch ".(eot|ttf|otf|woff)$">
Header set Access-Control-Allow-Origin "*"
</FilesMatch>