如何停止 apache 与 /favicon.ico 匹配 /favicon

发布于 2024-09-27 11:30:53 字数 331 浏览 0 评论 0原文

我有一个使用 apache mod_rewrite 和 php 运行的网站

在我的 public_html 文件夹中,我有 diss .htaccess 文件,

RewriteEngine On
RewriteBase /

RewriteRule ^([0-9a-z]+)$ index.php?reurl=$1 

如果该目录中没有同名文件,则该文件可以正常工作。例如 /favicon 将匹配文件 /favicon.ico 并且 RewriteRule 将永远不会被执行。

我怎样才能停止 /favicon 来匹配 /favicon.ico ?

I have site running with apache mod_rewrite and php

In my public_html folder i have diss .htaccess file

RewriteEngine On
RewriteBase /

RewriteRule ^([0-9a-z]+)$ index.php?reurl=$1 

this works fine if there are no files in that directory with the same name. so for example /favicon would match the file /favicon.ico and the RewriteRule would never be executed.

how can i stop /favicon to match /favicon.ico ?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

ι不睡觉的鱼゛ 2024-10-04 11:30:53

这可能是由于 MultiViews 造成的。尝试禁用它:

Options -MultiViews

This is probably due to MultiViews. Try to disable it:

Options -MultiViews
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文