图片的完整URL被理解为在.HTACCESS中创建干净的URL后重定向到同一页面的网页

我想为我正在处理的网站创建干净的链接,并且图像显示不正确。我使用.htaccess文件重写了URL:

RewriteEngine on
RewriteRule home index.html
RewriteRule braids braids.html

我知道以这种方式使用可能会遇到一些路径问题,这就是为什么我在braids.html中使用图像的完整URL的原因。但是,它们仍然不起作用。图片未显示。当我尝试输入图像链接时,它会将我重定向到braids.html之前的同一页面。

您能帮我解决问题吗?

预先感谢

编辑:我已经检查了chrome控制台以查找可能的原因。对于未显示的每个图像,它显示以下错误:

Cross-Origin Read Blocking (CORB) blocked cross-origin response https://example.com/images/braids/braids1.jpg with MIME type text/html. See https://www.chromestatus.com/feature/5629709824032768 for more details.

EDIT2:我忘了提到我正在使用javascript灯箱显示图像。超出显示范围的其他图像。

<a href="https://example.com/img/braids/braids (4).jpg" data-lightbox="braids"><img class="imggal" src="https://example.com/img/braids/braids (4).jpg"/></a>

guoshigege3 回答:图片的完整URL被理解为在.HTACCESS中创建干净的URL后重定向到同一页面的网页

暂时没有好的解决方案,如果你有好的解决方案,请发邮件至:iooj@foxmail.com
本文链接:https://www.f2er.com/3123999.html

大家都在问