|
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 application/javascript application/x-javascript application/json image/svg+xml |
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 |
| - |
195 | 35 | <IfModule mod_expires.c>
|
196 |
| - |
197 |
| -############################################ |
198 |
| -## Add default Expires header |
199 |
| -## http://developer.yahoo.com/performance/rules.html#expires |
200 |
| - |
201 | 36 | ExpiresDefault "access plus 1 year"
|
202 | 37 | ExpiresByType text/html A0
|
203 | 38 | ExpiresByType text/plain A0
|
204 |
| - |
205 | 39 | </IfModule>
|
206 |
| - |
207 |
| -########################################### |
208 |
| -## Deny access to root files to hide sensitive application information |
209 | 40 | RedirectMatch 403 /\.git
|
210 |
| - |
211 | 41 | <Files composer.json>
|
212 | 42 | order allow,deny
|
213 | 43 | deny from all
|
|
280 | 110 | order allow,deny
|
281 | 111 | deny from all
|
282 | 112 | </Files>
|
283 |
| - |
284 |
| -# For 404s and 403s that aren't handled by the application, show plain 404 response |
285 | 113 | ErrorDocument 404 /pub/errors/404.php
|
286 | 114 | ErrorDocument 403 /pub/errors/404.php
|
287 |
| - |
288 |
| -################################ |
289 |
| -## If running in cluster environment, uncomment this |
290 |
| -## http://developer.yahoo.com/performance/rules.html#etags |
291 |
| - |
292 |
| - #FileETag none |
293 |
| - |
294 |
| -# ###################################################################### |
295 |
| -# # INTERNET EXPLORER # |
296 |
| -# ###################################################################### |
297 |
| - |
298 |
| -# ---------------------------------------------------------------------- |
299 |
| -# | Document modes | |
300 |
| -# ---------------------------------------------------------------------- |
301 |
| - |
302 |
| -# Force Internet Explorer 8/9/10 to render pages in the highest mode |
303 |
| -# available in the various cases when it may not. |
304 |
| -# |
305 |
| -# https://hsivonen.fi/doctype/#ie8 |
306 |
| -# |
307 |
| -# (!) Starting with Internet Explorer 11, document modes are deprecated. |
308 |
| -# If your business still relies on older web apps and services that were |
309 |
| -# designed for older versions of Internet Explorer, you might want to |
310 |
| -# consider enabling `Enterprise Mode` throughout your company. |
311 |
| -# |
312 |
| -# https://msdn.microsoft.com/en-us/library/ie/bg182625.aspx#docmode |
313 |
| -# http://blogs.msdn.com/b/ie/archive/2014/04/02/stay-up-to-date-with-enterprise-mode-for-internet-explorer-11.aspx |
314 |
| - |
315 | 115 | <IfModule mod_headers.c>
|
316 |
| - |
317 | 116 | Header set X-UA-Compatible "IE=edge"
|
318 |
| - |
319 |
| - # `mod_headers` cannot match based on the content-type, however, |
320 |
| - # the `X-UA-Compatible` response header should be send only for |
321 |
| - # HTML documents and not for the other resources. |
322 |
| - |
323 | 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)$">
|
324 | 118 | Header unset X-UA-Compatible
|
325 | 119 | </FilesMatch>
|
326 |
| - |
327 | 120 | </IfModule>
|
0 commit comments