-
Notifications
You must be signed in to change notification settings - Fork 21
/
Copy path.htaccess
37 lines (27 loc) · 1.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
DirectoryIndex index.php
RewriteEngine on
#RewriteCond %{HTTPS} off [OR]
#RewriteCond %{HTTP_HOST} !^www\. [NC]
#RewriteCond %{HTTP_HOST} ^(?:www\.)?(.+)$ [NC]
#RewriteRule ^ https://www.%1%{REQUEST_URI} [L,NE,R=301]
RewriteCond $1 !^(index\.php|(.*)\.swf|assets|system|robots\.txt|favicon\.ico|favicon\.png)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ ./index.php?$1 [L,QSA]
ErrorDocument 404 /error404
# ----------------------------------------------------------------------
# Allow loading of external fonts
# ----------------------------------------------------------------------
<FilesMatch "\.(ttf|otf|eot|woff|woff2)$">
<IfModule mod_headers.c>
SetEnvIf Origin "http(s)?://(www\.)?(google.com|googletagmanager.com|staging.google.com|maxcdn.bootstrapcdn.com|development.google.com|tradefinex.org)$" AccessControlAllowOrigin=$0
Header add Access-Control-Allow-Origin %{AccessControlAllowOrigin}e env=AccessControlAllowOrigin
</IfModule>
</FilesMatch>
ExpiresActive On
ExpiresDefault A0
# Set up caching on media files for 1 week
<FilesMatch "\.(gif|jpg|jpeg|png|swf|svg)$">
ExpiresDefault A604800
Header append Cache-Control "public"
</FilesMatch>