This repository has been archived by the owner on Sep 23, 2024. It is now read-only.
forked from osCommerce/osCommerce-V4
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.htaccess
executable file
·118 lines (102 loc) · 3.66 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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
#<IfModule mod_headers.c>
# Header always set Strict-Transport-Security "max-age=86400; includeSubDomains; preload"
#</IfModule>
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteRule /*\.svn(/|$) - [F,L]
RewriteRule /*\.sh($) - [F,L]
RewriteRule /*\.log($) - [F,L]
#RewriteCond %{HTTP_HOST} !^www\.
#RewriteCond %{HTTPS}s on(s)|offs()
#RewriteRule ^ http%1://www.%{HTTP_HOST}%{REQUEST_URI} [NE,L,R]
#RewriteRule ^ https://www.%{HTTP_HOST}%{REQUEST_URI} [NE,L,R=301]
RewriteCond %{HTTP:Authorization} ^(.+)$
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
# if a directory or a file exists, use it directly
RewriteCond %{REQUEST_FILENAME} !-f
#RewriteCond %{REQUEST_FILENAME} !-d
# otherwise forward it to index.php
RewriteRule . index.php
</IfModule>
## EXPIRES CACHING ##
<IfModule mod_expires.c>
AddType image/svg+xml .svg .svgz
ExpiresActive On
ExpiresByType image/jpg "access 1 month"
ExpiresByType image/jpeg "access 1 month"
ExpiresByType image/gif "access 1 month"
ExpiresByType image/png "access 1 month"
ExpiresByType text/css "access 1 month"
ExpiresByType application/pdf "access 1 month"
ExpiresByType application/javascript "access 1 month"
ExpiresByType application/x-javascript "access 1 month"
ExpiresByType application/x-shockwave-flash "access 1 month"
ExpiresByType image/x-icon "access 1 month"
ExpiresByType image/svg+xml "access plus 1 month"
# Fonts
# Add correct content-type for fonts
AddType application/vnd.ms-fontobject .eot
AddType application/x-font-ttf .ttf
AddType application/x-font-opentype .otf
AddType application/x-font-woff .woff
# Add a far future Expires header for fonts
ExpiresByType application/vnd.ms-fontobject "access 1 month"
ExpiresByType application/x-font-ttf "access 1 month"
ExpiresByType application/x-font-opentype "access 1 month"
ExpiresByType application/x-font-woff "access 1 month"
ExpiresDefault "access 2 days"
</IfModule>
## EXPIRES CACHING ##
## DEFLATE COMPRESSION ##
<IfModule mod_deflate.c>
AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/xml
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE application/xml
AddOutputFilterByType DEFLATE application/xhtml+xml
AddOutputFilterByType DEFLATE application/rss+xml
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE application/x-javascript
AddOutputFilterByType DEFLATE image/svg+xml
AddOutputFilterByType DEFLATE application/vnd.ms-fontobject
AddOutputFilterByType DEFLATE application/x-font-ttf
AddOutputFilterByType DEFLATE application/x-font-opentype
AddOutputFilterByType DEFLATE application/x-font-woff
</IfModule>
## DEFLATE COMPRESSION ##
# X-Frame-Options
<IfModule mod_headers.c>
Header set X-Frame-Options "SAMEORIGIN"
</IfModule>
## For links like /admin/index ##
<IfModule mod_negotiation.c>
Options -MultiViews
</IfModule>
##
<IfModule mod_php7.c>
php_value max_execution_time 600
php_value max_input_time 600
php_value max_input_vars 10000
php_value memory_limit 256M
php_value post_max_size 64M
php_value upload_max_filesize 64M
php_value max_file_uploads 50
php_value session.gc_probability 1
php_value session.gc_maxlifetime 14400
</IfModule>
<IfModule mod_php.c>
php_value max_execution_time 600
php_value max_input_time 600
php_value max_input_vars 10000
php_value memory_limit 256M
php_value post_max_size 64M
php_value upload_max_filesize 64M
php_value max_file_uploads 50
php_value session.gc_probability 1
php_value session.gc_maxlifetime 14400
</IfModule>
<IfModule mod_security.c>
SecFilterEngine Off
SecFilterScanPOST Off
</IfModule>