klein / klein.php

A fast & flexible router
MIT License
2.66k stars 290 forks source link

Error with SVG images #402

Open Kedoper opened 5 years ago

Kedoper commented 5 years ago

Hi, the problem is that you get a 404 error when you try to display an SVG image on a page. For example, I have such a structure phpstorm64_9FOqyJXI2X

I specify the path "/img/icons/Twitter_Logo_Blue.svg". And it turns out that the image is not loaded, and in the browser developer console error 404.

However, if you specify a file in PNG format, it is quietly displayed.

I don't understand what the problem is. Can you help?

Because I'm sure it has to do with Klein

gbouthenot commented 5 years ago

What is your .htaccess / apache configuration for this directory ? Maybe you specify gif/jpg file extension, but no .svg. Just an idea.

Kedoper commented 5 years ago

What is your .htaccess / apache configuration for this directory ? Maybe you specify gif/jpg file extension, but no .svg. Just an idea.

In this file I have only this

RewriteEngine On RewriteRule ^.*$ index.php [NC,L]