网站图标未显示在目录中
我有一个目录,当您看到如下所示的目录索引时,需要显示我公司的图标:
如您所见,favicon.ico 位于该文件夹中,但托管该文件的公司的 favicon 显示在浏览器中。我在网上搜索答案但一无所获。我真的不知道如何做到这一点,而且我确信有办法......是apache吗?
I have a directory that needs to show my company's favicon when you see the directory index that looks like this:
as you can see, favicon.ico is in the folder, but the favicon of the company this is hosted with is displaying in the browser. I searched online for an answer but i found nothing. I really don't have any idea how to do this, and i'm sure there's a way... is it apache?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您需要在 Apache 配置中包含以下指令:
就它显示在目录索引中而言,我不确定它是否有效,因为您通常需要添加这段 HTML 来通知浏览器:存在图标:
您也许可以修改 Apache 用于显示目录索引的模板,但我不知道它在哪里(或者即使可以修改,老实说)
You're going to need to have the following directive in your Apache config:
As far as it showing up in the directory index, I'm not sure it will work because you normally need to add this bit of HTML to inform the browser that a favicon exists:
You may be able to modify the template used by Apache to display directory indexes, but I don't know where it is (or even if it's possible to modify, honestly)
由于某些奇怪的原因,网站图标可能需要很长时间才能显示在浏览器中。我想说的是,在更改图标 24 到 48 小时后,您才真正应该担心。
For some odd reason, the favicon can take along time to show up in the browser. I would say you shouldn't really be concerned until 24 to 48 hours after you've changed the icon.