Limon Limon - 1 year ago 170
PHP Question

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:

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

I've tried>

<IfModule mod_alias.c>
RedirectMatch 403 favicon.ico

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]

Answer Source

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).


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

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download