gpt4 book ai didi

css - htaccess 需要本地中断背景图像

转载 作者:行者123 更新时间:2023-11-28 07:04:42 24 4
gpt4 key购买 nike

我使用 .htaccess 文件中的以下行保护我的图像文件夹不被浏览:

require local

这提供了我需要的安全性,但阻止了 CSS 背景图像的显示。

style="background: url(../data/profile_img/profile_10.jpg?x=1444352490)"

使用 img 标签访问文件有效,但 css 无效。

提前致谢

最佳答案

我自己解决了这个问题。原来我的 .htaccess 根本没有被尊重。

解决方案是删除+Apache 配置文件中的 FollowSymLinks,在目录区域

<Directory "/var/www">
AllowOverride All
</Directory>

关于css - htaccess 需要本地中断背景图像,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33028329/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com