D
D
Denis2021-05-16 12:36:30
MAMP
Denis, 2021-05-16 12:36:30

How to properly configure the MAMP PRO server to display SVG files?

Funny story. I installed MAMP PRO, I load the site - svg files are not shown. Googled a couple of articles, they say you need to add 2 lines to .htaccess:
AddType image / svg + xml .svg .svgz
AddEncoding gzip svgz
After adding the lines, the problem remained. The funny thing is that when I open it in the usual MAMP everything is fine, everything is displayed. PS I'm loading through
<img src="icons/logo.svg" alt="Логотип">

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Dimonchik, 2021-05-16
@dimonchik2013

logs

D
Denis, 2021-05-16
@Cobra8106

MAMP PRO
General:
Status Code: 404 Not Found
Remote Address: [::1]:80
Referrer Policy: strict-origin-when-cross-origin
Response Headers
Connection: Keep-Alive
Content-Length: 196
Content-Type: text/ html; charset=iso-8859-1 // How to change this parameter?
Date: Sun, 16 May 2021 11:31:37 GMT
Keep-Alive: timeout=5, max=98
Server: Apache/2.4.46 (Unix) OpenSSL/1.0.2u PHP/7.4.12...
=== ============================================
MAMP (Regular)
General:
Status Code: 200 OK (from memory cache)
Remote Address: [::1]:80
Response Headers
Referrer Policy: strict-origin-when-cross-origin
Accept-Ranges: bytes
Content-Length: 16123
Content-Type: image/svg+xml
Date: Sun, 16 May 2021 10:20:47 GMT
...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question