-
Notifications
You must be signed in to change notification settings - Fork 5
/
.htaccess
57 lines (48 loc) · 1.3 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
54
55
56
57
ErrorDocument 403 /sitesupport/index.php
# NONE
<FilesMatch ".(pl|php|cgi|js|spl)$">
Header unset Cache-Control
Header unset Expires
Header unset Last-Modified
FileETag None
Header unset Pragma
</FilesMatch>
# Cache Control - From www.askapache.com
# 3 Month
<FilesMatch ".(flv|gif|jpg|jpeg|png|ico|swf)$">
Header set Cache-Control "max-age=7257600"
</FilesMatch>
# 1 Week
<FilesMatch ".(css|pdf|txt)$">
Header set Cache-Control "max-age=604800"
</FilesMatch>
# 2 Hours
<FilesMatch ".(html|htm|xml)$">
Header set Cache-Control "max-age=7200, must-revalidate"
</FilesMatch>
<IfModule mod_ssl.c>
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
</IfModule>
</IfModule>
# Block 'hidden' files
<FilesMatch "^\.(env|ht|svn|git)">
<IfModule !mod_access_compat.c>
Require all denied
</IfModule>
<IfModule mod_access_compat.c>
Order deny,allow
Deny from all
</IfModule>
</FilesMatch>
# Don't show directory listings for URLs which map to a directory.
Options -Indexes
# Session Timeout - 1 hour
<IfModule mod_php5.c>
#Session timeout
php_value session.cookie_lifetime 3600
php_value session.gc_maxlifetime 3600
</IfModule>
Header set Access-Control-Allow-Origin "http://localhost:2080"