-
Notifications
You must be signed in to change notification settings - Fork 2
/
.htaccess
34 lines (28 loc) · 1.21 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
<IfModule mod_rewrite.c>
RewriteEngine On
#RewriteBase /
# Redirect to www variant
RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteRule ^(.*)$ https://www.%{HTTP_HOST}/$1 [R=301,L]
# Maintenance - addd UNDER_MAINTENANCE file when there is a maintenance and all non-privileged people should get message instead
RewriteCond UNDER_MAINTENANCE -f
RewriteCond %{HTTP_COOKIE} !^.*SKIP_MAINTENANCE=true.*$
RewriteRule (.*) .maintenance.php [L]
# Route all trafic to www dir
RewriteCond %{REQUEST_URI} !^/www
RewriteCond %{REQUEST_URI} !^/old
RewriteRule ^(.*)$ /www/$1 [NC,L]
</IfModule>
<IfModule mod_headers.c>
# Cache CSS, JS, FAVICON and FONTS for really long, if they change their ?<TIMESTAMP> will force update
<FilesMatch ".(css|js|ico|woff|woff2)$">
Header set Cache-Control "max-age=604800, public"
</FilesMatch>
# Cache some asset images that are not supposed to be changed as often, they will however change with build
<FilesMatch "bg-bottom\.svg|bg\.png|footer-sova\.png$">
Header set Cache-Control "max-age=604800, public"
</FilesMatch>
</IfModule>
# Change upload limits
php_value post_max_size 20M
php_value upload_max_filesize 20M