Invalid link file

When viewing most pages (on the main page), the site creates an incorrect link to the image file:

+4
source share
1 answer

As discussed in the chat, your Apache configurator has

RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*[^/])$ /$1/ [L,R=301,NE]

What it does is that if the file does not exist, it is checked with the addition /at the end. This would mean that the png file you really do not exist and should give you 404, but these rules give you 301 with the application /and then exit as 404.

So the problem is that the image is simply missing

+4
source

Source: https://habr.com/ru/post/1689642/


All Articles