|
1 |
| -############################################ |
2 |
| -## overrides deployment configuration mode value |
3 |
| -## use command bin/magento deploy:mode:set to switch modes |
4 |
| - |
5 |
| -# SetEnv MAGE_MODE developer |
6 |
| - |
7 |
| -############################################ |
8 |
| -## uncomment these lines for CGI mode |
9 |
| -## make sure to specify the correct cgi php binary file name |
10 |
| -## it might be /cgi-bin/php-cgi |
11 |
| - |
12 |
| -# Action php5-cgi /cgi-bin/php5-cgi |
13 |
| -# AddHandler php5-cgi .php |
14 |
| - |
15 |
| -############################################ |
16 |
| -## GoDaddy specific options |
17 |
| - |
18 |
| -# Options -MultiViews |
19 |
| - |
20 |
| -## you might also need to add this line to php.ini |
21 |
| -## cgi.fix_pathinfo = 1 |
22 |
| -## if it still doesn't work, rename php.ini to php5.ini |
23 |
| - |
24 |
| -############################################ |
25 |
| -## this line is specific for 1and1 hosting |
26 |
| - |
27 |
| - #AddType x-mapp-php5 .php |
28 |
| - #AddHandler x-mapp-php5 .php |
29 |
| - |
30 |
| -############################################ |
31 |
| -## default index file |
32 |
| - |
33 |
| - DirectoryIndex index.php |
34 |
| - |
| 1 | +# All explanations you could find in .htaccess.sample file |
| 2 | +DirectoryIndex index.php |
35 | 3 | <IfModule mod_php5.c>
|
36 |
| - |
37 |
| -############################################ |
38 |
| -## adjust memory limit |
39 |
| - |
40 | 4 | php_value memory_limit 768M
|
41 | 5 | php_value max_execution_time 18000
|
42 |
| - |
43 |
| -############################################ |
44 |
| -## disable automatic session start |
45 |
| -## before autoload was initialized |
46 |
| - |
47 | 6 | php_flag session.auto_start off
|
48 |
| - |
49 |
| -############################################ |
50 |
| -## enable resulting html compression |
51 |
| - |
52 |
| - #php_flag zlib.output_compression on |
53 |
| - |
54 |
| -########################################### |
55 |
| -## disable user agent verification to not break multiple image upload |
56 |
| - |
57 | 7 | php_flag suhosin.session.cryptua off
|
58 |
| - |
59 | 8 | </IfModule>
|
60 |
| - |
61 | 9 | <IfModule mod_php7.c>
|
62 |
| - |
63 |
| -############################################ |
64 |
| -## adjust memory limit |
65 |
| - |
66 | 10 | php_value memory_limit 768M
|
67 | 11 | php_value max_execution_time 18000
|
68 |
| - |
69 |
| -############################################ |
70 |
| -## disable automatic session start |
71 |
| -## before autoload was initialized |
72 |
| - |
73 | 12 | php_flag session.auto_start off
|
74 |
| - |
75 |
| -############################################ |
76 |
| -## enable resulting html compression |
77 |
| - |
78 |
| - #php_flag zlib.output_compression on |
79 |
| - |
80 |
| -########################################### |
81 |
| -## disable user agent verification to not break multiple image upload |
82 |
| - |
83 | 13 | php_flag suhosin.session.cryptua off
|
84 |
| - |
85 | 14 | </IfModule>
|
86 |
| - |
87 | 15 | <IfModule mod_security.c>
|
88 |
| -########################################### |
89 |
| -## disable POST processing to not break multiple image upload |
90 |
| - |
91 | 16 | SecFilterEngine Off
|
92 | 17 | SecFilterScanPOST Off
|
93 | 18 | </IfModule>
|
94 |
| - |
95 |
| -<IfModule mod_deflate.c> |
96 |
| - |
97 |
| -############################################ |
98 |
| -## enable apache served files compression |
99 |
| -## http://developer.yahoo.com/performance/rules.html#gzip |
100 |
| - |
101 |
| - # Insert filter on all content |
102 |
| - ###SetOutputFilter DEFLATE |
103 |
| - # Insert filter on selected content types only |
104 |
| - #AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css text/javascript |
105 |
| - |
106 |
| - # Netscape 4.x has some problems... |
107 |
| - #BrowserMatch ^Mozilla/4 gzip-only-text/html |
108 |
| - |
109 |
| - # Netscape 4.06-4.08 have some more problems |
110 |
| - #BrowserMatch ^Mozilla/4\.0[678] no-gzip |
111 |
| - |
112 |
| - # MSIE masquerades as Netscape, but it is fine |
113 |
| - #BrowserMatch \bMSIE !no-gzip !gzip-only-text/html |
114 |
| - |
115 |
| - # Don't compress images |
116 |
| - #SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip dont-vary |
117 |
| - |
118 |
| - # Make sure proxies don't deliver the wrong content |
119 |
| - #Header append Vary User-Agent env=!dont-vary |
120 |
| - |
121 |
| -</IfModule> |
122 |
| - |
123 | 19 | <IfModule mod_ssl.c>
|
124 |
| - |
125 |
| -############################################ |
126 |
| -## make HTTPS env vars available for CGI mode |
127 |
| - |
128 | 20 | SSLOptions StdEnvVars
|
129 |
| - |
130 | 21 | </IfModule>
|
131 |
| - |
132 |
| -############################################ |
133 |
| -## workaround for Apache 2.4.6 CentOS build when working via ProxyPassMatch with HHVM (or any other) |
134 |
| -## Please, set it on virtual host configuration level |
135 |
| - |
136 |
| -## SetEnvIf Authorization "(.*)" HTTP_AUTHORIZATION=$1 |
137 |
| -############################################ |
138 |
| - |
139 | 22 | <IfModule mod_rewrite.c>
|
140 |
| - |
141 |
| -############################################ |
142 |
| -## enable rewrites |
143 |
| - |
144 | 23 | Options +FollowSymLinks
|
145 | 24 | RewriteEngine on
|
146 |
| - |
147 |
| -############################################ |
148 |
| -## you can put here your magento root folder |
149 |
| -## path relative to web root |
150 |
| - |
151 |
| - #RewriteBase /magento/ |
152 |
| - |
153 |
| -############################################ |
154 |
| -## workaround for HTTP authorization |
155 |
| -## in CGI environment |
156 |
| - |
157 | 25 | RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
|
158 |
| - |
159 |
| -############################################ |
160 |
| -## TRACE and TRACK HTTP methods disabled to prevent XSS attacks |
161 |
| - |
162 | 26 | RewriteCond %{REQUEST_METHOD} ^TRAC[EK]
|
163 | 27 | RewriteRule .* - [L,R=405]
|
164 |
| - |
165 |
| -############################################ |
166 |
| -## redirect for mobile user agents |
167 |
| - |
168 |
| - #RewriteCond %{REQUEST_URI} !^/mobiledirectoryhere/.*$ |
169 |
| - #RewriteCond %{HTTP_USER_AGENT} "android|blackberry|ipad|iphone|ipod|iemobile|opera mobile|palmos|webos|googlebot-mobile" [NC] |
170 |
| - #RewriteRule ^(.*)$ /mobiledirectoryhere/ [L,R=302] |
171 |
| - |
172 |
| -############################################ |
173 |
| -## never rewrite for existing files, directories and links |
174 |
| - |
175 | 28 | RewriteCond %{REQUEST_FILENAME} !-f
|
176 | 29 | RewriteCond %{REQUEST_FILENAME} !-d
|
177 | 30 | RewriteCond %{REQUEST_FILENAME} !-l
|
178 |
| - |
179 |
| -############################################ |
180 |
| -## rewrite everything else to index.php |
181 |
| - |
182 | 31 | RewriteRule .* index.php [L]
|
183 |
| - |
184 | 32 | </IfModule>
|
185 |
| - |
186 |
| - |
187 |
| -############################################ |
188 |
| -## Prevent character encoding issues from server overrides |
189 |
| -## If you still have problems, use the second line instead |
190 |
| - |
191 | 33 | AddDefaultCharset Off
|
192 |
| - #AddDefaultCharset UTF-8 |
193 |
| - |
| 34 | + AddType 'text/html; charset=UTF-8' html |
194 | 35 | <IfModule mod_expires.c>
|
195 |
| - |
196 |
| -############################################ |
197 |
| -## Add default Expires header |
198 |
| -## http://developer.yahoo.com/performance/rules.html#expires |
199 |
| - |
200 | 36 | ExpiresDefault "access plus 1 year"
|
201 | 37 | ExpiresByType text/html A0
|
202 | 38 | ExpiresByType text/plain A0
|
203 |
| - |
204 | 39 | </IfModule>
|
205 |
| - |
206 |
| -########################################### |
207 |
| -## Deny access to root files to hide sensitive application information |
208 |
| - RedirectMatch 404 /\.git |
209 |
| - |
| 40 | + RedirectMatch 403 /\.git |
210 | 41 | <Files composer.json>
|
211 | 42 | order allow,deny
|
212 | 43 | deny from all
|
|
243 | 74 | order allow,deny
|
244 | 75 | deny from all
|
245 | 76 | </Files>
|
246 |
| - <Files CONTRIBUTOR_LICENSE_AGREEMENT.html> |
247 |
| - order allow,deny |
248 |
| - deny from all |
249 |
| - </Files> |
250 | 77 | <Files COPYING.txt>
|
251 | 78 | order allow,deny
|
252 | 79 | deny from all
|
|
280 | 107 | deny from all
|
281 | 108 | </Files>
|
282 | 109 | <Files magento_umask>
|
283 |
| - order allow,deny |
284 |
| - deny from all |
| 110 | + order allow,deny |
| 111 | + deny from all |
285 | 112 | </Files>
|
286 |
| - |
287 |
| -################################ |
288 |
| -## If running in cluster environment, uncomment this |
289 |
| -## http://developer.yahoo.com/performance/rules.html#etags |
290 |
| - |
291 |
| - #FileETag none |
292 |
| - |
293 |
| -############################################ |
294 |
| -## Add custom headers |
| 113 | +ErrorDocument 404 /pub/errors/404.php |
| 114 | +ErrorDocument 403 /pub/errors/404.php |
295 | 115 | <IfModule mod_headers.c>
|
296 |
| - Header set X-Content-Type-Options "nosniff" |
297 |
| - Header set X-XSS-Protection "1; mode=block" |
| 116 | + Header set X-UA-Compatible "IE=edge" |
| 117 | + <FilesMatch "\.(appcache|atom|bbaw|bmp|crx|css|cur|eot|f4[abpv]|flv|geojson|gif|htc|ico|jpe?g|js|json(ld)?|m4[av]|manifest|map|mp4|oex|og[agv]|opus|otf|pdf|png|rdf|rss|safariextz|svgz?|swf|topojson|tt[cf]|txt|vcard|vcf|vtt|webapp|web[mp]|webmanifest|woff2?|xloc|xml|xpi)$"> |
| 118 | + Header unset X-UA-Compatible |
| 119 | + </FilesMatch> |
298 | 120 | </IfModule>
|
0 commit comments