Пропали картинки из-за редиректа .htaccess

Решил сделать редирект чтобы в конце добавлялся слэш. Файл был

Order Deny,Allow
Deny from 5.53.120.214

addDefaultCharset utf-8
RewriteRule ^admin/$ admin/index.php
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([^.]+)$ $1.html [NC,L]
RemoveHandler .html .htm
AddType application/x-httpd-php .php .htm .html .phtml

RewriteRule ^index$    / [R=301,L]

RewriteEngine on


RewriteRule ^catalog/([A-Za-z0-9_]+)/? catalog.html?id=$1 [L]
RewriteRule ^category/([0-9]+)/([0-9]+)/? sub_sub_catalog.html?id=$1&ct=$2 [L]
RewriteRule ^category/([0-9]+)/? sub_sub_catalog.html?id=$1 [L]
RewriteRule ^tovar/([A-Za-z0-9_]+)/? cart.html?id=$1 [L]
RewriteRule ^novost/([0-9]+)/? novost_0.html?id=$1 [L]
RewriteRule ^portfolio/([0-9]+)/? portfolio_card.html?id=$1 [L]
RewriteRule ^brand/([0-9]+)/([0-9]+)/? brand_sub.html?id=$1&parent=$2 [L]
RewriteRule ^brand/([0-9]+)/? brand.html?id=$1 [L]
RewriteRule ^brands/([0-9]+)/([0-9]+)/([0-9]+)/? brands.html?br=$1&parent=$2&id=$3 [L]
RewriteRule ^brands/([0-9]+)/([0-9]+)/? brands.html?br=$1&id=$2 [L]

Добавил

RewriteCond %{REQUEST_URI} !\?  
RewriteCond %{REQUEST_URI} !\&
RewriteCond %{REQUEST_URI} !\=
RewriteCond %{REQUEST_URI} !\.
RewriteCond %{REQUEST_URI} !\/$
RewriteRule ^(.*[^\/])$ /$1/ [R=301,L]

Стал

Order Deny,Allow
Deny from 5.53.120.214


RewriteCond %{REQUEST_URI} !\?  
RewriteCond %{REQUEST_URI} !\&
RewriteCond %{REQUEST_URI} !\=
RewriteCond %{REQUEST_URI} !\.
RewriteCond %{REQUEST_URI} !\/$
RewriteRule ^(.*[^\/])$ /$1/ [R=301,L]


addDefaultCharset utf-8
RewriteRule ^admin/$ admin/index.php
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([^.]+)$ $1.html [NC,L]
RemoveHandler .html .htm
AddType application/x-httpd-php .php .htm .html .phtml

RewriteRule ^index$    / [R=301,L]

RewriteEngine on


RewriteRule ^catalog/([A-Za-z0-9_]+)/? catalog.html?id=$1 [L]
RewriteRule ^category/([0-9]+)/([0-9]+)/? sub_sub_catalog.html?id=$1&ct=$2 [L]
RewriteRule ^category/([0-9]+)/? sub_sub_catalog.html?id=$1 [L]
RewriteRule ^tovar/([A-Za-z0-9_]+)/? cart.html?id=$1 [L]
RewriteRule ^novost/([0-9]+)/? novost_0.html?id=$1 [L]
RewriteRule ^portfolio/([0-9]+)/? portfolio_card.html?id=$1 [L]
RewriteRule ^brand/([0-9]+)/([0-9]+)/? brand_sub.html?id=$1&parent=$2 [L]
RewriteRule ^brand/([0-9]+)/? brand.html?id=$1 [L]
RewriteRule ^brands/([0-9]+)/([0-9]+)/([0-9]+)/? brands.html?br=$1&parent=$2&id=$3 [L]
RewriteRule ^brands/([0-9]+)/([0-9]+)/? brands.html?br=$1&id=$2 [L]

Теперь не отображаются картинки. Пишет в консоли:

Failed to load resource: the server responded with a status of 404 ()  /upload/1588615586png/

Хотя путь правильный


Ответы (0 шт):