K
K
kamnerobot2019-03-25 01:41:13
linux
kamnerobot, 2019-03-25 01:41:13

How to fix paths for svg files?

On a Debian 9 and Apache web server. I uploaded the site to the root of the host and svg icons are not displayed. In firefox, I get a "file not found" error on F12. And the files are all there. Icons are inserted like this.
<img src="icons/company_badge/company_phone.svg">
Moreover, the rest of the pictures are loaded normally, the problem is only with svg.
Interestingly, if you load the site not in the DocumentRoot, but in a subfolder, say mysite.ru/test/, then everything works fine.
What could be causing this glitch?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Adamos, 2019-03-25
@Adamos

#.htaccess
AddType image/svg+xml svg svgz
AddEncoding gzip svgz

K
kamnerobot, 2019-03-25
@kamnerobot

alas, it didn’t help, and what’s interesting in this host was a Laravel site before that, and svg worked fine in it.
And now I threw a static index.html there with pictures and svg do not work.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question