简体   繁体   中英

favicon internal server error

I changed win for ios and now I can't open the admin of a website I've created.

The error is:

Request URL: http://local.mysite/favicon.ico

Request Method:GET Status Code:500

Internal Server Error

Remote Address:127.0.0.1:80

I have tried looking at xampp/logs and no error is shown.

I've tried adding:

<IfModule mod_alias.c>
  RedirectMatch 403 favicon.ico
</IfModule>

to the .htaccess file

also added to the code: <link rel="icon" href="data:;base64,iVBORw0KGgo=">

but I'm going blind on this, don't know what else to do.

this is my .htaccess file:

RewriteCond %{REQUEST_URI} ^system.*
RewriteRule ^(.*)$ /index.php?/$1 [L]
RewriteCond %{REQUEST_URI} ^application.*
RewriteRule ^(.*)$ /index.php?/$1 [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?/$1 [L]

My guess is that previously since favicon.ico existed, you didn't notice this. When you removed it, the "file doesn't exist, so go to index.php" started the behavior. Try putting this in the top of your index.php:

if ($_SERVER['REQUEST_URI']=='/favicon.ico') exit('');

or beef it up by sending something with the appropriate headers or even output that png (with the appropriate header for png).

OR

how about just putting a favicon back, it can be that same png, but then you're not battling this issue any more.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM